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
Related
When upgrading to newer versions of npm from 6.14 to latest on react native project
Using node 14, nvm to switch node versions, ideally i'd like to go to node 16, but a similar issue happens regardless of 14 or 16 when updating npm in particular.
I'm also using homebrew on mac M1
I notice the Jetify command asks me:
Jetifier found 1390 file(s) to forward-jetify. Using 8 workers...
Need to install the following packages:
pod
Ok to proceed? (y)
when i select y, npm i fails. I've cleared cache's and removed node_modules. normal cache clearing attempts don't seem to work.
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /Users/user/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/user/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2022-01-28T21_51_28_303Z-debug-0.log
npm ERR! code 254
npm ERR! path /Users/user/repos/MyApp/My-MobileApp
npm ERR! command failed
npm ERR! command sh -c npx jetify && cd ios && npx pod install && cd .. && ./node_modules/.bin/patch-package
Here is part of the complete log -
3325 timing reify:rollback:retireShallow Completed in 0ms
3326 timing command:exec Completed in 42372ms
3327 verbose stack Error: ENOENT: no such file or directory, chmod '/Users/user/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2'
3328 verbose cwd /Users/user/repos/MyApp/MyApp-MobileApp/ios
3329 verbose Darwin 21.2.0
3330 verbose argv "/Users/user/.nvm/versions/node/v14.18.3/bin/node" "/Users/user/.nvm/versions/node/v14.18.3/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "pod" "install"
3331 verbose node v14.18.3
3332 verbose npm v8.4.0
3333 error code ENOENT
3334 error syscall chmod
3335 error path /Users/user/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2
3336 error errno -2
3337 error enoent ENOENT: no such file or directory, chmod '/Users/user/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2'
3338 error enoent This is related to npm not being able to find a file.
3338 error enoent
3339 verbose exit -2
3340 timing npm Completed in 42533ms
3341 verbose unfinished npm timer reify 1643406718315
3342 verbose unfinished npm timer reify:build 1643406730346
3343 verbose unfinished npm timer build 1643406730346
3344 verbose unfinished npm timer build:deps 1643406730347
3345 verbose unfinished npm timer build:link 1643406730354
3346 verbose unfinished npm timer build:link:node_modules/pod 1643406730356
3347 verbose code -2
3348 error A complete log of this run can be found in:
3348 error /Users/user/.npm/_logs/2022-01-28T21_51_28_303Z-debug-0.log
It looks like the error is related to not finding the pm2 package from pod dependency.
Not sure if this will work properly with npx, you might need to install pod globally to get this working.
npm install pod -g
pod install // instead of npx pod install
https://www.npmjs.com/package/pod#installation
Try npm rebuild they say to use "only when you upgrade the node version and must recompile"
hello i once faced this type of issue and issue was actually because pm2 or some other package or processes on old node which was used in your app wasnt found in the updated node version
Reinstall your pm2 package and other package used by your old node in your code again and try again
let me know if this helps you
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.
I succesfully had the electron GUI running for testing my app, including the electron hello world application that they have here: http://electron.atom.io/docs/tutorial/quick-start/
Now however whenever I type the command: npm start in the command line I get this error (even when just trying to set up the hello world example again):
12 error Windows_NT 6.1.7601
13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
14 error node v4.4.4
15 error npm v2.15.1
16 error code ELIFECYCLE
17 error electron-quick-start#1.0.0 start: `electron main.js`
17 error Exit status 3221225781
18 error Failed at the electron-quick-start#1.0.0 start script 'electron main.js'.
18 error This is most likely a problem with the electron-quick-start package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error electron main.js
18 error You can get information on how to open an issue for this project with:
18 error npm bugs electron-quick-start
18 error Or if that isn't available, you can get their info via:
18 error
18 error npm owner ls electron-quick-start
18 error There is likely additional logging output above.
Also one instance of an electron app I set up previously still works when I call npm start.
I would like to be able to setup new apps, partially because my original one doesn't have the correct folder structure.
So using npm list --depth 1 I went to both the folders with both the working electron app, and the not working electron app. Both show electron-prebuilt#1.1.0 as being present. Although using npm list -g shows that electron-prebuilt is not installed globally, perhaps that would be a good idea?
Update Electron to v1.1.1 (npm install electron-prebuilt#latest --save-dev) and that should hopefully solve your issue (which is probably that you're missing the VC++2015 runtime). Installing electron-prebuilt globally isn't going to fix anything.
I have been trying to install jdbc in RHEL6 but keeps on getting
error Linux 4.1.17-22.30.amzn1.x86_64
9680 error argv "/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/bin/npm" "--production" "install"
9681 error node v4.3.0
9682 error npm v2.14.12
9683 error code ELIFECYCLE
9684 error java#0.4.7 install: `node-gyp rebuild`
9684 error Exit status 1
9685 error Failed at the java#0.4.7 install script 'node-gyp rebuild'.
9685 error This is most likely a problem with the java package,
9685 error not with npm itself.
9685 error Tell the author that this fails on your system:
9685 error node-gyp rebuild
I am attaching the npm-debug
http://pasted.co/c60c05d2
The install worked prefectly when i tried it on windows 7 .
I am stuck on this for days. Please help
Edit: please find the full logs here npm-debug http://pasted.co/70275c54
nodejs log http://pasted.co/fc4729ea
Hello i am using Koding Cloud Based Ubuntu Development environment.
I've managed to is install all prerequisites required for Yeoman Angular FullStack.
Installed Successfully below items
sudo npm install -g yo grunt-cli bower karma
sudo npm install -g generator-angular-fullstack
After installing above.
i've created abltd directory (Folder structure shown below)
and ran following command
yo angular-fullstack abltd
it ran all to the end and throwing following error.
1070 error Error: EACCES, mkdir '/home/abitandco/tmp/npm-1293-IkfHqNho'
1070 error { [Error: EACCES, mkdir '/home/abitandco/tmp/npm-1293-IkfHqNho']
1070 error errno: 3,
1070 error code: 'EACCES',
1070 error path: '/home/abitandco/tmp/npm-1293-IkfHqNho',
1070 error parent: 'abltd' }
1071 error Please try running this command again as root/Administrator.
1072 error System Linux 3.13.0-29-generic
1073 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
1074 error cwd /home/abitandco/abltd
1075 error node -v v0.10.26
1076 error npm -v 1.4.3
1077 error path /home/abitandco/tmp/npm-1293-IkfHqNho
1078 error code EACCES
1079 error errno 3
1080 error stack Error: EACCES, mkdir '/home/abitandco/tmp/npm-1293-IkfHqNho'
1081 verbose exit [ 3, true ]
i tried running as sudo yo angular-fullstack abltd but no difference.
i am adding complete log and image as well to help understand problem better.
Can anyone point me in right direction please.
I have complete npm debug log if any one wants to see it.
its likely that your ~/.npm or ~/tmp directories are owned by the root user. try again but ensure that those directories are owned by your username.
Give yourself permission using the following command
sudo chown -R youruser /home/youruser