NodeJS: npx webpack command fails due to write EOF error - javascript

Okay, I'm not a programmer first of all, so I have 0 idea what is happening. Please go easy on me..
The project I'm trying to compile is a web browser extension (or webpack idk). There is a file called Installer.bat with the "npm i" command and a file called compiler.bat with the "npx webpack" command.
Now, there is no issue within the project, because it worked on the same machine with different windows 7 with no problems. On this ystem (32-bit windows 7 by the way) I keep getting the following error when running compiler.bat file :
Error: write EOF
at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
I know I should probably link the webpack.config.js code here, but it's pretty big and I'm thinking that this error is ocurring because of something entirely different anyway. I will say that during the installation of nodejs, the additional chocolatey packages failed because of problems with powershell/TLS 1.2 or whatever. I do have python 3.6 installed though. Not sure if that matters but yeah. And also, my friend who downloaded it on his machine has also stumbled across an error with the compiler.bat but it was a EPIPE error.
Any ideas? Do I need to install something else besides NodeJS? This project isn't mine and it always compiled with no problems in the past (on the same machine but a different windows 7 though). I tried to look for answers for weeks, but found nothing. Mostly people just had issues with their project CODE not the nodejs or modules. I'm almost losing hope and the author of the project doesn't want to communicate for whatever reason.
EDIT: Apparently didn't have java sdk 8 installed, fixed the issue.

Related

getting jdk and intellicode errors in vs code. how do i fix it?

I am a very early beginner to coding. I downloaded VS Code so that I could, you know, have somewhere to code in Java. However, I keep getting these two errors telling me these two extensions that I already have installed on VS Code are not working here are the error messages. I already searched through the odds and ends of StackOverflow and have tried everything, and nothing has worked. Any help would be appreciated.
I inputted some code into settings.json under a "java.configuration.runtimes" thing but nothing in it worked. I conformed it to my installation directories and current Java version
Do you have a JDK (Java Development Kit) installed?
If you are on Windows, you can check by clicking on the start button, and search through applications and programs for a Java folder.
If you are on MacOS or Linux, you can open up the terminal/command line and type in "java -version" and if it is properly installed, it will display the version.
If you do not find a JDK installed, install one from https://www.oracle.com/ca-en/java/technologies/downloads/
Download and install the Coding Pack for Java.
It would be helpful to follow this documentation to get started.

Same react codebase on Mac and Linux, works on Mac but won't run on Linux due to errors?

Devs, why would 'react-scripts build' command show "import" and "default export" errors on the Linux but not on the Mac? Same codebase. Is there a config or environmental var that allows you to ignore errors in jsx files during this process?
My issue is that I have the same codebase that I am trying to get setup on both a Mac and a Linux, both computer have the same package versions installed, use the same command to run (i.e. npm start). My issue is that while the program can get up and running on the Mac just fine, on Linux it stops right after installing dependencies... line, indicating that there is some error that is preventing the program from running fully, both programs are being run from Visual Studio Code.
A suspicion of a friend is that there is some configuration setup possible on the Mac that is forcing the build script to ignore certain errors during the build process, thereby allowing the program to run despite having errors. This appears to have been confirmed when I once found a random error in the react code - fixed it - attempted to run the script again and it stopped due to a different error. While I don't have time to run through the entire codebase looking for small errors like this, I would be interested know if there is such a script that is forcing the react build to ignore said errors and if so where can I locate it on Windows/Linux and fix it?
Thanks again!

I can't build the app when following Ember.js 2.4 "Getting Started" guide

I'm trying to learn Ember.js and so I started to read some installation guides with npm. Then I went to try a small Getting Started tutorial guide they have on their website. I followed each step without to much exploration just to see if it worked well.
Everything went fine, the app was loading and acting as expected on localhost:4200 server and it was pretty nice to develop actually. The problem was on the final step, where you have to build the app with your command line using ember build --env production and the dist/ folder will have your final code. The command line trown some errors and when I went to the index.html file on dist/ folder, the page was blank in Chrome.
This happened in MacOS and Windows 10 to.
I'm using ember-cli version 2.4.3, node version 4.4.3 and npm version 3.8.9 on a Windows 10 machine x64 architecture.
The error trown by the command line was:
Cleanup error.
ENOTEMPTY: directory not empty, rmdir 'C:\root\tut\tmp\template_compiler-output_path-NGSFwxV3.tmp\modules\ember-cli-app-version'
Error: ENOTEMPTY: directory not empty, rmdir 'C:\root\tut\tmp\template_compiler-output_path-NGSFwxV3.tmp\modules\ember-cli-app-version'
at Error (native)
at Object.fs.rmdirSync (fs.js:758:18)
at rmkidsSync (C:\root\tut\node_modules\ember-cli-htmlbars\node_modules\broccoli-persistent-filter\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:247:11)
at rmdirSync (C:\root\tut\node_modules\ember-cli-htmlbars\node_modules\broccoli-persistent-filter\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:237:7)
at fixWinEPERMSync (C:\root\tut\node_modules\ember-cli-htmlbars\node_modules\broccoli-persistent-filter\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:150:5)
at rimrafSync (C:\root\tut\node_modules\ember-cli-htmlbars\node_modules\broccoli-persistent-filter\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:216:26)
at C:\root\tut\node_modules\ember-cli-htmlbars\node_modules\broccoli-persistent-filter\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:245:5
at Array.forEach (native)
at rmkidsSync (C:\root\tut\node_modules\ember-cli-htmlbars\node_modules\broccoli-persistent-filter\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:244:26)
at rmdirSync (C:\root\tut\node_modules\ember-cli-htmlbars\node_modules\broccoli-persistent-filter\node_modules\broccoli-plugin\node_modules\quick-temp\node_modules\rimraf\rimraf.js:237:7)
Built project successfully. Stored in "dist/".
File sizes:
- tut-d41d8cd98f00b204e9800998ecf8427e.css: 0 B
- tut-faee034545d48621fa86656f6c15f508.js: 9.15 KB (1.99 KB gzipped)
- vendor-d41d8cd98f00b204e9800998ecf8427e.css: 0 B
- vendor-eeea1e3023f3e98422c781bcc7b2588e.js: 689.89 KB (180.23 KB gzipped)
I don't know if this affects in anything but I've runned the ember build command while the ember server was still rilling.
I wanted to understand if I'm doing something wrong, or if this ember tutorial is outdated, of if anyone has experienced this same problem and how to solve this issue.
Thanks
Just a suggestion. I wouldn't run ember b or ember build while the server is running within another console window.
Both ember build end ember serve run the broccoli build pipeline, wich depends on temporary files in the tmp dir. If you start it twice this can lead to problems. Stop your server for the build.
I found the answer in this issue on github:
https://github.com/ember-cli/ember-cli/issues/3861
Turns out I didn't have production configured base URL and other stuff I should have.

Integrating jsLint into BBEdit

How do I incorporate jsLint into BBEdit?
Environment:
OSX Mountain Lion
BBEdit 10.1.2 (3152)
I installed Node.js (0.8.14) and ran
sudo npm install -g jslint
I am able to run jslint from the command line by running
jslint [filepath/]filename
I found a tutorial that seems to explain how to connect jsLint to BBEdit; however, I have never written an AppleScript and have no idea where to start.
Any guidance would be much appreciated.
UPDATE
I loaded the AppleScript from the tutorial into the AppleScript Editor Application and ran it.
I'm now getting the following error message:
Can’t get paragraphs 3 thru -1 of "Can’t make POSIX path of missing
value into type Unicode text.".
I found the problem. I am using the BBEdit FTP browser and working directly off the server. This was causing problems with the file path that the AppleScript was relying on.
A short-term solution is to work on the file locally and then upload it when complete.
The better solution would be to mount the server as a drive. This would provide the most functionality with the greatest ease of use.

Problems with Rails and JavaScript runtime on Windows machine

I am currently in a web development class and we are using Ruby on Rails.
I am using Ruby v1.9.2 and Rails v3.1.1.
My initial problem started when I tried to execute 'rails server'.
I would get the following error:
C:\Sites\rorProjects\basicRoRProject>rails server
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/execjs-1.2.13/lib/execjs/runtimes.rb:47:in `autodetect': Could not find a JavaScript runtime.
See https://github.com/sstephenson/execjs for a list of available runtimes.(ExecJS::RuntimeUnavailable)
I have done some reading and the general consensus is to install the gems 'execjs' and 'therubyracer'. 'execjs' installed just fine, however when I tried to install 'therubyracer' I got the following error:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing therubyracer: ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.
Check the mkmf.log file for more details.
You may need configuration options.
I then did some more reading and found a couple of people said to check that they had the gem 'libv8', which was required for 'therubyracer'. I did that and discovered that I didn't have it, so I then went to install that and got the same error that I did for 'therubyracer'.
I'm at a loss to think of anything else to do. Any help would be greatly appreciated.
Thanks guys!
THIS PROBLEM HAS BEEN SOLVED.
So, with the help of one of my classmates who had a similar problem, I installed Node.js using the Windows installer (this gave me a JavaScript run-time environment). I then added it to the path in the local variables.
So, with the help of one of my classmates who had a similar problem, I installed Node.js using the Windows installer. I then added it to the path in the local variables.

Categories