Electron ubuntu mate 16.04 doesn't install
santino83 opened this issue · 1 comments
santino83 commented
Hello,
trying to install electron in ubuntu mate 16.04, I get this error:
npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! electron@1.4.5 postinstall: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the electron@1.4.5 postinstall script 'node install.js'.
WORKAROUND:
postinstall is looking for "node" command, but in ubuntu mate default name is "nodejs". so I fix the problem with
sudo ln -s /usr/bin/nodejs /usr/bin/node
and install went ok
kevinsawicki commented
I believe this was fixed directly in npm 3.7.0 to put the node version that npm
was spawned with at the beginning of the PATH
so that version will be used by run scripts.
Closing this out since this was resolved in npm.