Open Santhoshas opened 7 years ago
I have the same error
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 Receiving...
Error making request. Error: read ECONNRESET at _errnoException (util.js:1026:11) at TLSWrap.onread (net.js:606:25)
Please report this full log at https://github.com/Medium/phantomjs npm info lifecycle phantomjs-prebuilt@2.1.15~install: Failed to exec install script npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.15 install: node install.js
npm ERR! Exit status 1
I am encountering the same error when running npm install phantomjs-prebuilt
(phantomjs-prebuilt@2.1.16) as part of my CI build on Codeship:
/node_modules/phantomjs-prebuilt/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
const Hoek = require('hoek');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.
npm ERR! phantomjs-prebuilt@2.1.16 install: node install.js
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script 'node install.js'.
I've got the same issue
$ sudo npm install -g grunt-contrib-qunit --save-dev npm WARN engine request@2.83.0: wanted: {"node":">= 4"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine form-data@2.3.1: wanted: {"node":">= 0.12"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine har-validator@5.0.3: wanted: {"node":">=4"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine hawk@6.0.2: wanted: {"node":">=4.5.0"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine har-schema@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine boom@4.3.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine cryptiles@3.1.2: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine hoek@4.2.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine sntp@2.1.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine boom@5.2.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.48","npm":"2.15.1"}) npm WARN engine co@4.6.0: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"0.10.48","npm":"2.15.1"})
phantomjs-prebuilt@2.1.16 install /usr/lib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt node install.js
/usr/lib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
const Hoek = require('hoek');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.
npm ERR! phantomjs-prebuilt@2.1.16 install: node install.js
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs-prebuilt 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-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.
Update: I was able to resolve the issue with node install.js
by running nvm install 8.9.0
(the current recommended version of node) prior to running npm install phantomjs-prebuilt
.
I see that in my case, phantomjs-prebuilt was pulling in a very old version of node-- 0.10.48.
updating the node/npm versions did not help for me - same error persists.
What worked for me for phantomjs-prebuilt@2.1.16. was to:
nvm install 8.9.0
Now I have node version 8.9.0 and npm version 5.5.1.
Good luck!
This is occurring in TravisCI, so the above solutions are not feasible, unfortunately.
What worked for me:
nvm install 8.9.0
npm install
node v6.11.3 npm v3.10.10
NAME="CentOS Linux" VERSION="7 (Core)"
npm ERR! Linux 3.10.0-514.26.2.el7.x86_64 npm ERR! argv "/usr/bin/node" "/bin/npm" "install" npm ERR! node v6.11.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE
npm ERR! phantomjs-prebuilt@2.1.99 install:
node install.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs-prebuilt@2.1.99 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-prebuilt 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-prebuilt npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls phantomjs-prebuilt npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! /home/cloud-user/testGit/cast-auth/cast-auth-demo-ui/npm-debug.log