Closed stevekuznetsov closed 8 years ago
I got very similar issue:
npm ERR! Linux 4.4.0-24-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! phantomjs@1.9.20 install:
node install.js
npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the phantomjs@1.9.20 install script 'node install.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the phantomjs package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node install.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs phantomjs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls phantomjs npm ERR! There is likely additional logging output above.
I got rid of this by installing nodejs-legacy in my Ubuntu 16.04:
sudo apt install nodejs-legacy
this indicates you don't have node installed, please read the troubleshooting guide https://github.com/Medium/phantomjs#troubleshooting
in particular: https://github.com/Medium/phantomjs#im-on-debian-or-ubuntu-and-the-installer-failed-because-it-couldnt-find-node
@nicks
Just ran into this again on EC2 and I do have node
installed.
$ which node
/bin/node
$ node --version
v0.10.42
$ which npm
/bin/npm
$ npm --version
3.7.3
This seems intermittent -- re-running the installation I have no issues.
Is this solved? I just ran into this issue on gitlab-ci.
npm ERR! Linux 4.7.3-coreos-r2
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE
For me the problem was not having bzip2 installed
sudo yum install bzip2
@DenislavD It solved my issue!!
@DenislavD How did you find that missing bzip2
was the source of the problem for you ?
In my case, phantom is required by karma-phantomjs-launcher
and I just upgraded node from lts/argon
(4.x) to lts/boron
(6.x).
So I had to upgrade karma-phantomjs-launcher
(from 0.1.4
to 1.0.4
) and I got phantomjs v2.1.14
instead 1.x
and the issue was fixed.
sudo apt install nodejs-legacy solved my problem. Thanks @knowgod
Not installing with -g
global option worked for me.
Installing phantom.js 1.9.15 on AWS EC2 I intermittently see this failure in my console output:
Here is the relevant snippet (I think) of
npm-debug.log
:Please let me know if you would like other information about my system to help debug this issue