Medium / phantomjs

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

Failed at the phantomjs@2.1.7 install script 'node install.js' #771

Open jorkun opened 6 years ago

jorkun commented 6 years ago

npm ERR! Windows_NT 10.0.16299 npm ERR! argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "i" "phantomjs" "-g" npm ERR! node v6.9.1 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE

npm ERR! phantomjs@2.1.7 install: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs@2.1.7 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.

npm ERR! Please include the following file with any support request:

Bia3 commented 6 years ago

I just ran into the same issue on my system installing v2.1.6

npm ERR! Linux 4.13.0-25-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--global" "pageres-cli"
npm ERR! node v6.11.4
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 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/bia3/npm-debug.log
npm ERR! code 1

npm-debug.log

Bia3 commented 6 years ago

I just got my install working by uninstalling npm and reinstalling using nvm https://github.com/creationix/nvm/blob/master/README.md#installation.

nvm install 8.0 --latest-npm
adrianjarc commented 6 years ago

Same happening here (happened today (12. 03. 2018)). Here is my log from console when i run npm i:


> phantomjs-prebuilt@2.1.16 install /home/adrian/work/mightyfields/worker/node_modules/phantom/node_modules/phantomjs-prebuilt
> node install.js

/home/adrian/work/mightyfields/worker/node_modules/phantom/node_modules/sntp/lib/index.js:19
exports.time = async function (options = {}) {
                     ^^^^^^^^

SyntaxError: Unexpected token function
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/adrian/work/mightyfields/worker/node_modules/phantom/node_modules/hawk/lib/index.js:5:16)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)

npm ERR! Linux 4.4.0-116-generic
npm ERR! argv "/home/adrian/.nvm/versions/node/v5.12.0/bin/node" "/home/adrian/.nvm/versions/node/v5.12.0/bin/npm" "i"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 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.

and running npm i --verbose:

> phantomjs-prebuilt@2.1.16 install /home/adrian/work/mightyfields/worker/node_modules/phantom/node_modules/phantomjs-prebuilt
> node install.js

/home/adrian/work/mightyfields/worker/node_modules/phantom/node_modules/sntp/lib/index.js:19
exports.time = async function (options = {}) {
                     ^^^^^^^^

SyntaxError: Unexpected token function
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/adrian/work/mightyfields/worker/node_modules/phantom/node_modules/hawk/lib/index.js:5:16)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
npm verb lifecycle phantomjs-prebuilt@2.1.16~install: unsafe-perm in lifecycle true
npm verb lifecycle phantomjs-prebuilt@2.1.16~install: PATH: /home/adrian/.nvm/versions/node/v5.12.0/lib/node_modules/npm/bin/node-gyp-bin:/home/adrian/work/mightyfields/worker/node_modules/phantom/node_modules/phantomjs-prebuilt/node_modules/.bin:/home/adrian/work/mightyfields/worker/node_modules/phantom/node_modules/.bin:/home/adrian/work/mightyfields/worker/node_modules/.bin:/home/adrian/.nvm/versions/node/v5.12.0/bin:/home/adrian/.sdkman/candidates/gradle/current/bin:/home/adrian/.nvm/versions/node/v5.12.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/jdk1.8.0_162/bin:/home/adrian/Android/Sdk/platform-tools:/home/adrian/Android/Sdk/tools:/home/adrian/Android/Sdk/tools/bin:/usr/local/poedit-1.8.13/src
npm verb lifecycle phantomjs-prebuilt@2.1.16~install: CWD: /home/adrian/work/mightyfields/worker/node_modules/phantom/node_modules/phantomjs-prebuilt
npm info lifecycle phantomjs-prebuilt@2.1.16~install: Failed to exec install script
npm verb unlock done using /home/adrian/.npm/_locks/staging-8097edc6fde9be22.lock for /home/adrian/work/mightyfields/worker/node_modules/.staging
mfworker@2.9.3 /home/adrian/work/mightyfields/worker
└── (empty)

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.3
npm verb stack Error: phantomjs-prebuilt@2.1.16 install: `node install.js`
npm verb stack Exit status 1
npm verb stack     at EventEmitter.<anonymous> (/home/adrian/.nvm/versions/node/v5.12.0/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
npm verb stack     at emitTwo (events.js:100:13)
npm verb stack     at EventEmitter.emit (events.js:185:7)
npm verb stack     at ChildProcess.<anonymous> (/home/adrian/.nvm/versions/node/v5.12.0/lib/node_modules/npm/lib/utils/spawn.js:24:14)
npm verb stack     at emitTwo (events.js:100:13)
npm verb stack     at ChildProcess.emit (events.js:185:7)
npm verb stack     at maybeClose (internal/child_process.js:850:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
npm verb pkgid phantomjs-prebuilt@2.1.16
npm verb cwd /home/adrian/work/mightyfields/worker
npm ERR! Linux 4.4.0-116-generic
npm ERR! argv "/home/adrian/.nvm/versions/node/v5.12.0/bin/node" "/home/adrian/.nvm/versions/node/v5.12.0/bin/npm" "i" "--verbose"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 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 verb exit [ 1, true ]

npm ERR! code 1