npm errors a lot

Whenever I run a command with npm it says something like this:


> electron-quick-start@1.0.0 start /home/hoidberg/electron-quick-start
> electron .

sh: 1: electron: not found

npm ERR! electron-quick-start@1.0.0 start: `electron .`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the electron-quick-start@1.0.0 start script.
npm ERR! This is most likely a problem with the electron-quick-start package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron .
npm ERR! You can get their info via:
npm ERR!     npm owner ls electron-quick-start
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.18.0-16-generic
npm ERR! command "/home/hoidberg/.nvm/v0.10.32/bin/node" "/home/hoidberg/.nvm/v0.10.32/bin/npm" "start"
npm ERR! cwd /home/hoidberg/electron-quick-start
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/hoidberg/electron-quick-start/npm-debug.log
npm ERR! not ok code 0

or this:

npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "[--save-exact]": Tags may not have any characters that encodeURIComponent encodes.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/hoidberg/.npm/_logs/2019-03-12T23_13_28_454Z-debug.log

also this:

npm WARN engine electron@4.0.8: wanted: {"node":">= 4.0"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (/home/hoidberg/.nvm/v0.10.32/lib/node_modules/npm/lib/cache/add-named.js:260:10)
npm ERR!     at /home/hoidberg/.nvm/v0.10.32/lib/node_modules/npm/lib/cache/add-named.js:203:12
npm ERR!     at saved (/home/hoidberg/.nvm/v0.10.32/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.18.0-16-generic
npm ERR! command "/home/hoidberg/.nvm/v0.10.32/bin/node" "/home/hoidberg/.nvm/v0.10.32/bin/npm" "install"
npm ERR! cwd /home/hoidberg/electron-quick-start
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code E405
npm ERR! not ok code 0

how can I fix this?

Date When Error Was Shown: 2019-03-12T05:00:00Z

You appear to be running node v0.10.32, which is old and is well outside the Long Term Support window for node. That is causing one of the errors, where electron is reporting it only works with node >= 4.0.

You likewise have an old version of npm, but that will likely get updated along with node so focus on node first.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.