MacOS Electron JS Installation Missing Path Link - node.js

After running npm install electron#latest on MacOS with and without sudo permissions, I can't use the electron command. The error codes in the log file are:
117 error code ELIFECYCLE
118 error errno 1
119 error electron#5.0.4 postinstall: `node install.js`
119 error Exit status 1
120 error Failed at the electron#5.0.4 postinstall script.
120 error This is probably not a problem with npm. There is likely additional logging output above.
121 verbose exit [ 1, true ]
Is this a bug (because I am reading similar errors on GitHub but these are closed now)? Or is there a way to repair or further force the installation?
I am pretty new to NPM/ Electron so it could just be that that's how it's normal and I lack experience, but it worked fine on my Windows machine, so I was wondering. Thank you for your help!

I installed electron js with command sudo npm install -g electron#latest --unsafe-perm=true on Mac. I can run the electron command.

Related

appuim installation with node js

how to solve this problem?
verbose node v10.14.2
verbose npm v6.4.1
error code ELIFECYCLE
error errno 1
error appium-chromedriver#4.10.0 install: `node install-npm.js`
error Exit status 1
error Failed at the appium-chromedriver#4.10.0 install script.
error This is probably not a problem with npm. There is likely additional logging output above.
verbose exit [ 1, true ]
This worked: sudo npm install -g appium --unsafe-perm=true --allow-root
First of all, I would highly recommend using a node version manager for Node/npm installation.
Appium installation works perfectly with node version 10.1.0:
nvm install 10.1.0
//in new shell
nvm use node
npm install -g appium
Update: I think you are facing a similar issue, caused by Windows firewall or some proxy.
What you need to do is set the --chromedriver_cdnurl flag during npm install to the server which is accessible within your firewall:
npm install -g appium --chromedriver_cdnurl=http://localhost:1234
Maybe even better to setup npm proxy following instructions

Error with 'npm start'

I'm using Node v4.2.6 and npm v3.5.2 on Ubuntu, I clone my proyect from github and install all the modules. When I do npm start its run fine, but when I try to run it again start crashing and the only way I find to make it work again is to re-clone the project.
It's a rare and dummy question i think, can someone help me? Pardon my bad english, here is the npm-debug.log error:
17 error Linux 4.4.0-92-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "lite"
19 error node v4.2.6
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error firstApp-client#1.0.0 lite: lite-server
22 error Exit status 1
23 error Failed at the firstApp-client#1.0.0 lite script 'lite-server'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the firstApp-client package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error lite-server
23 error You can get information on how to open an issue for this project with:
23 error npm bugs firstApp-client
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls firstApp-client
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
I don't know why but it seems to be that the problem was an incompatibility of the versions of nodejs.
I run:
$ sudo npm cache clean -f
$ sudo npm install -g n
$ sudo n stable
$ sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/nodejs
And all was resolve. Thanks for the comments

NPM Install fails - fsevents

I'm unable to get npm installed correctly in my laravel project. I'm running laravel on a vagrant box (ubuntu-trusty-64). When I run 'npm install' I get the first error in my pastebin (linked below). I then found somewhere below that I should run it without symlinks when using a vagrant box on a windows host os so I then ran 'npm install --no-bin-links' and I was still getting the first error. So then with some help I ran 'rm -rf node_modules' then ran the 'npm install --no-bin-links' and it appears to work but hangs see second half of the pastebin.
Please help!
pastebin: https://pastebin.com/wuRkjqi6
Update:
Just to update everyone on the status, I completely removed npm and reinstalled it following:
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
for node.js 8
I then ran 'sudo npm install --no-bin-links --verbose' directly from the host vm via virtualbox bypassing the vagrant ssh; but it still bombs out on me; this time with an error. but still surrounding fsevents.
27990 info lifecycle vue#2.4.2~postinstall: vue#2.4.2
27991 verbose unlock done using /home/vagrant/.npm/_locks/staging-71408633a969dee2.lock for /home/vagrant/projects/MusekClub/node_modules/.staging
27992 verbose stack Error: ETXTBSY: text file is busy, rmdir '/home/vagrant/projects/MusekClub/node_modules/fsevents/node_modules'
27993 verbose cwd /home/vagrant/projects/MusekClub
27994 verbose Linux 3.13.0-125-generic
27995 verbose argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-bin-links" "--verbose"
27996 verbose node v8.2.1
27997 verbose npm v5.3.0
27998 error path /home/vagrant/projects/MusekClub/node_modules/fsevents/node_modules
27999 error code ETXTBSY
28000 error errno -26
28001 error syscall rmdir
28002 error ETXTBSY: text file is busy, rmdir '/home/vagrant/projects/MusekClub/node_modules/fsevents/node_modules'
28003 verbose exit [ -26, true ]
Lastly I tried rebuilding the vagrant box from scratch this morning and when I re-ran 'sudo npm install --no-bin-links --verbose' from the virtualbox host I get the following:
vagrant#vagrant-ubuntu-trusty-64:~/projects/MusekClub$ sudo npm install
npm ERR! path /home/vagrant/projects/MusekClub/node_modules/fsevents/build/Release/.deps/User/eshanker/Code/fsevents/lib
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rmdir
npm ERR! ETXTBSY: text file is busy, rmdir '/home/vagrant/projects/MusekClub/node_modules/fsevents/build/Release/.deps/Users/eshanker/Code/fsevents/lib'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2017-08-09T12_45_58_590Z-debug.log
I removed the standard dependencies from the default laravel 5.4 package.json file. I then installed each one, one by one. I found that my issue only occurs when installing the "laravel-mix": "^1.0" dependency line.
I was able to overcome my issue by ditching npm and utilizing yarn. Seems to get past the fsevents module as reading it as an optional dependency. Given what I've researched it appears that fsevents isn't supported on linux anyways.
vagrant#vagrant-ubuntu-trusty-64:~/projects/MusekClub$ sudo yarn install
yarn install v0.27.5
Resolving packages...
Fetching packages...
warning fsevents#1.1.2: The platform "linux" is incompatible with this module.
info "fsevents#1.1.2" is an optional dependency and failed compatibility check.
Excluding it from installation.
Linking dependencies...
Building fresh packages...
Done in 67.15s.
npm install --no-optional helped me, but it is merely dodging the problem.
Using vagrant I was able to get around this by removing --node-bin-links and running my vagrant box as admin. I'm using roughly the same versions of node and npm.

Why Can't My AWS instance install node-sass pacakage?

I made an app using Node and am trying to host it using AWS's Elastic Beanstalk, but it always fails npm install when it reaches node-sass. Here is the error from the logs:
5162 error node-sass#4.5.0 postinstall: node scripts/build.js
5162 error Exit status 1
5163 error Failed at the node-sass#4.5.0 postinstall script 'node scripts/build.js'.
5163 error Make sure you have the latest version of node.js and npm installed.
5163 error If you do, this is most likely a problem with the node-sass package,
5163 error not with npm itself.
5163 error Tell the author that this fails on your system:
5163 error node scripts/build.js
5163 error You can get information on how to open an issue for this project with:
5163 error npm bugs node-sass
5163 error Or if that isn't available, you can get their info via:
5163 error npm owner ls node-sass
5163 error There is likely additional logging output above.
5164 verbose exit [ 1, true ]
And here is my repository: https://github.com/Jacob-Elder/react-socket.io-messaging
This is my aws configuration
I searched this issue and found some people reinstalled node-sass with the '--unsafe-perm' flag, but this doesn't seem to be a permissions issue. I'm new to AWS and coding so any help is much appreciated!
So I also had npm install fail on node-sass. I get roughly the same error message as you, but then a few lines above the lines you mention in the original post, I see this "make: g++: Command not found
make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 127".
Judging from this similar stackexchange post: https://serverfault.com/questions/204893/aws-ec2-and-build-essential,
which in turn points to the AWS docs, you may have to run sudo yum groupinstall "Development Tools" to get some additional binaries

npm weird error 135 on using npm start

I am installing Ghost and while installing it I followed the following steps at:
http://docs.ghost.org/installation/linux/
But on running npm start I get the following errors:
> node index
Bus error (core dumped)
npm ERR! weird error 135
npm ERR! not ok code 0
What should I do? I am a newbie to node or npm
According to this site, and this also, there is most likely an environment issue such as an improperly or missing file or configuration setting. Trying in a new, fresh installed environment should fix this issue.

Resources