Medium / phantomjs

NPM wrapper for installing phantomjs
Other
1.42k stars 436 forks source link

Install phantomjs-prebuilt@2.1.14 failed: code ELIFECYCLE #730

Open johnlinp opened 6 years ago

johnlinp commented 6 years ago

I failed to install phantomjs-prebuilt@2.1.14 on Arch Linux. Here are the commands and outputs:

root@jacky:~# node -v
v8.2.1
root@jacky:~# npm -v
5.3.0
root@jacky:~# npm install -g phantomjs-prebuilt
/usr/bin/phantomjs -> /usr/lib/node_modules/phantomjs-prebuilt/bin/phantomjs

> phantomjs-prebuilt@2.1.14 install /usr/lib/node_modules/phantomjs-prebuilt
> node install.js

Considering PhantomJS found at /usr/bin/phantomjs
Looks like an `npm install -g`
Could not link global install, skipping...
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1501478812483/phantomjs-2.1.1-linux-x86_64 -> /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom
chmod failed: phantomjs was not successfully copied to /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.14 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.14 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-07-31T05_26_55_235Z-debug.log

Any help would be appreciated.

olivier-mauras commented 6 years ago

Same problem here

robinmin commented 6 years ago

me tooooooooooooooo!

vasttian commented 6 years ago

I have the same problem

RustyRaptor commented 6 years ago

Same here Ubuntu 16.04 Node 8.x What do?

RustyRaptor commented 6 years ago

Ok guys I fixed this by downgrading to Nodejs 6.x If you are using 6.x already try just reinstalling it. So cheap lesson learned. LTS > Latest unless you absolutely need the latest features.

jurgenhaas commented 6 years ago

Same problem on Ubuntu 16.04 with Node 6.10.0 and npm 5.3.0

gitcoffee commented 6 years ago

me too!??

acd10 commented 6 years ago

I had a similar problem. In my case phantomjs-prebuilt was missing from devDependencies in packages.json. I added it manually and it seemed to work fine after that.

mydaoyuan commented 6 years ago

npm install phantomjs-prebuilt@2.1.14 --ignore-scripts

see this stackoverflow

anitaIncaendo commented 6 years ago

In your case you have issue phantomjs-prebuilt@2.1.14 during npm install so install this package manually using command

npm install phantomjs-prebuilt@2.1.14 --ignore-scripts

OR can try apt-get install -y bzip2

RustyRaptor commented 6 years ago

I think we should close this thread. We kinda figured it out.