Medium / phantomjs

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

Installing phantomjs@1.9.14 fails #279

Closed davidparsson closed 9 years ago

davidparsson commented 9 years ago

Please see the error message below:

$ npm install phantomjs@1.9.14
|
> phantomjs@1.9.14 install /path/to/node_modules/phantomjs
> node install.js

Download already available at /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Extracting tar contents (via spawned process)
Removing /path/to/node_modules/phantomjs/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1422372968222/phantomjs-1.9.8-linux-x86_64 -> /path/to/node_modules/phantomjs/lib/phantom
Writing location.js file
Phantom installation failed { [Error: ENOTDIR, not a directory '/path/to/node_modules/phantomjs/lib/phantom/bin/phantomjs']
  errno: 27,
  code: 'ENOTDIR',
  path: '/path/to/node_modules/phantomjs/lib/phantom/bin/phantomjs',
  syscall: 'chmod' } Error: ENOTDIR, not a directory '/path/to/node_modules/phantomjs/lib/phantom/bin/phantomjs'
    at Object.fs.chmodSync (evalmachine.<anonymous>:832:18)
    at Object.chmodSync (/path/to/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/polyfills.js:141:17)
    at Promise.validExit [as _successFn] (/path/to/node_modules/phantomjs/install.js:145:8)
    at Promise._call (/path/to/node_modules/phantomjs/node_modules/kew/kew.js:373:13)
    at Promise._withInput (/path/to/node_modules/phantomjs/node_modules/kew/kew.js:333:25)
    at Promise.resolve (/path/to/node_modules/phantomjs/node_modules/kew/kew.js:105:27)
    at resolver (/path/to/node_modules/phantomjs/node_modules/kew/kew.js:409:17)
    at CB (/path/to/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.js:68:5)
    at Object.oncomplete (fs.js:107:15)

npm ERR! phantomjs@1.9.14 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs@1.9.14 install script.
npm ERR! 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 their info via:
npm ERR!     npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-44-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "phantomjs@1.9.14"
npm ERR! cwd /path/to
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
jasonmadigan commented 9 years ago

Seeing this too after noticing some failing CI builds.

wfortin commented 9 years ago

Also fails on Jenkins on windows

10:07:47 npm
10:07:47 > phantomjs@1.9.14 install E:\Jenkins\workspace\Cloud_FrontEnd_JS_Admin_Test\node_modules\karma-phantomjs-launcher\node_modules\phantomjs
10:07:47 > node install.js
10:07:47 
10:07:47  http 304 https://registry.npmjs.org/utile
10:07:47 npm http 304 https://registry.npmjs.org/pkginfo
10:07:47 npm http 304 https://registry.npmjs.org/semver
10:07:47 Download already available at C:\Users\SVC_QA~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip
10:07:54 Extracting zip contents
10:07:54 Removing E:\Jenkins\workspace\Cloud_FrontEnd_JS_Admin_Test\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom
10:07:54 Copying extracted folder C:\Users\SVC_QA~1\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1422371267440\phantomjs-1.9.8-windows -> E:\Jenkins\workspace\Cloud_FrontEnd_JS_Admin_Test\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom
10:07:54 Phantom installation failed { [Error: ENOENT, open 'E:\Jenkins\workspace\Cloud_FrontEnd_JS_Admin_Test\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom\ChangeLog']
10:07:54   errno: 34,
10:07:54   code: 'ENOENT',
10:07:54   path: 'E:\\Jenkins\\workspace\\Cloud_FrontEnd_JS_Admin_Test\\node_modules\\karma-phantomjs-launcher\\node_modules\\phantomjs\\lib\\phantom\\ChangeLog' } Error: ENOENT, open 'E:\Jenkins\workspace\Cloud_FrontEnd_JS_Admin_Test\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom\ChangeLog'
10:07:54 npm
10:07:54 > ws@0.4.32 install E:\Jenkins\workspace\Cloud_FrontEnd_JS_Admin_Test\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws
10:07:54 > (node-gyp rebuild 2> builderror.log) || (exit 0)
10:07:54 
nicks commented 9 years ago

thanks, i have unpublished v1.9.14 until we understand the problem

nicks commented 9 years ago

does anybody have any pointers to public travis-CI builds with this error? we've been trying to replicate but we haven't been able to.

jprichardson commented 9 years ago

Yeah, it'd be helpful for me to figure out the issue(s) in fs-extra as well.

davidparsson commented 9 years ago

Nope, sorry. I saw this on a private Jenkins installation. The only possibly useful information I can think of is that PhantomJS was not installed globally on this machine prior to running the command.

nicks commented 9 years ago

issue has been filed as https://github.com/jprichardson/node-fs-extra/issues/108, the key step was having a machine with a temp directory on a different device than the install directory.

jfbibeau commented 9 years ago

Anything more needs to be done for this? I'm still seeing the issue with phantomjs@1.9.16:

> phantomjs@1.9.16 install /workspace/node_modules/gulp-mocha-phantomjs/node_modules/phantomjs
> node install.js

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linu
x-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Receiving...
- [=======================================-] 98% 0.0s|
Received 12854K total.
Extracting tar contents (via spawned process)
Removing /workspace/node_modules/gulp-mocha-phantomjs/node_modules/phantomjs/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1426016131880/phantomjs-1.9.8-linux-x86_64 -> /workspace/node_modules/gulp-mocha-phantomjs/node_modules/phantomjs/lib/phantom
Writing location.js file
Phantom installation failed { [Error: ENOTDIR, not a directory '/workspace/node_modules/gulp-mocha-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs']
  errno: 27,
  code: 'ENOTDIR',
  path: '/workspace/node_modules/gulp-mocha-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs',
  syscall: 'chmod' } Error: ENOTDIR, not a directory '/workspace/node_modules/gulp-mocha-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs'
    at Object.fs.chmodSync (evalmachine.<anonymous>:832:18)
    at Object.chmodSync (/workspace/node_modules/gu
lp-mocha-phantomjs/node_modules/phantomjs/node_modules/fs-extra/node_modules/gra
ceful-fs/polyfills.js:141:17)
    at Promise.validExit [as _successFn] (/workspace/node_modules/orbwgul
p/node_modules/gulp-mocha-phantomjs/node_modules/phantomjs/install.js:145:8)
    at Promise._call (/workspace/node_modules/gulp-
mocha-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:373:13)
    at Promise._withInput (/workspace/node_modules/
gulp-mocha-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:333:25)
    at Promise.resolve (/workspace/node_modules/gul
p-mocha-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:105:27)
    at resolver (/workspace/node_modules/gulp-mocha
-phantomjs/node_modules/phantomjs/node_modules/kew/kew.js:409:17)
    at next (/workspace/node_modules/gulp-mocha-pha
ntomjs/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.j
s:70:7)
    at CB (/workspace/node_modules/gulp-mocha-phant
jprichardson commented 9 years ago

I just tried this and was unable to reproduce on either OS X Yosemite or Ubuntu Linux 14.04. Which Node / npm versions are you using?

jfbibeau commented 9 years ago

Here's my setup: Windows 7 Host RHEL 6.6 Guest VM running: npm 2.7.0 and node v0.10.33

/workspace is shared via Virtualbox shared folder, so /tmp ends up on a different device (which seems to be what this bug was originally about).

Let me know if you need anything else.

kevinmcdonnell commented 9 years ago

I am seeing this issue on:

OS X Yosemite Node v0.12.0 npm 2.5.1

/code is mounted via virtualbox and is Ubuntu Linux 14.04 machine

 phantomjs@1.9.16 install /Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-macosx.zip
Saving to /var/folders/n1/1637271j2wlf599cys650nww0000gn/T/phantomjs/phantomjs-1.9.8-macosx.zip
Receiving...
  [=======================================-] 98% 0.0s
Received 9187K total.
Extracting zip contents
Removing /Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Copying extracted folder /var/folders/n1/1637271j2wlf599cys650nww0000gn/T/phantomjs/phantomjs-1.9.8-macosx.zip-extract-1427149607879/phantomjs-1.9.8-macosx -> /Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Writing location.js file
Phantom installation failed { [Error: ENOTDIR, not a directory '/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs']
  errno: 27,
  code: 'ENOTDIR',
  path: '/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs',
  syscall: 'chmod' } Error: ENOTDIR, not a directory '/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs'
    at Object.fs.chmodSync (evalmachine.<anonymous>:832:18)
    at Object.chmodSync (/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/polyfills.js:141:17)
    at Promise.validExit [as _successFn] (/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js:145:8)
    at Promise._call (/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:373:13)
    at Promise._withInput (/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:333:25)
    at Promise.resolve (/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:105:27)
    at resolver (/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:409:17)
    at next (/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.js:70:7)
    at CB (/Users/kevinmcdonnell/salt-developer/code/api/assess/build/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.js:106:9)
    at Object.oncomplete (fs.js:107:15)
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "karma-phantomjs-launcher"
npm ERR! node v0.10.32
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! phantomjs@1.9.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs@1.9.16 install script 'node install.js'.
npm ERR! 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 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:
npm ERR!     /Users/kevinmcdonnell/salt-developer/code/api/assess/build/npm-debug.log
rodeoclown commented 9 years ago

Hi @nicks, I'm still seeing this issue with phantomjs@1.9.16, any sign of a resolution?

I'm on Windows 7 Host Running Vagrant/VirtualBox (vagrant_host is a shared folder, hosted on the Windows box).

Cheers!

$ npm install phantomjs
\
> phantomjs@1.9.16 install /vagrant_host/ynab_shared_library/node_modules/phantomjs
> node install.js

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Receiving...
  [=======================================-] 97% 0.0s
Received 12854K total.
Extracting tar contents (via spawned process)
Removing /vagrant_host/ynab_shared_library/node_modules/phantomjs/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1428441311626/phantomjs-1.9.8-linux-x86_64 -> /vagrant_host/ynab_shared_library/node_modules/ph
antomjs/lib/phantom
Writing location.js file
Phantom installation failed { [Error: ENOTDIR, not a directory '/vagrant_host/ynab_shared_library/node_modules/phantomjs/lib/phantom/bin/phantomjs']
  errno: 27,
  code: 'ENOTDIR',
  path: '/vagrant_host/ynab_shared_library/node_modules/phantomjs/lib/phantom/bin/phantomjs',
  syscall: 'chmod' } Error: ENOTDIR, not a directory '/vagrant_host/ynab_shared_library/node_modules/phantomjs/lib/phantom/bin/phantomjs'
    at Object.fs.chmodSync (evalmachine.<anonymous>:832:18)
    at Object.chmodSync (/vagrant_host/ynab_shared_library/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/polyfills.js:141:17)
    at Promise.validExit [as _successFn] (/vagrant_host/ynab_shared_library/node_modules/phantomjs/install.js:145:8)
    at Promise._call (/vagrant_host/ynab_shared_library/node_modules/phantomjs/node_modules/kew/kew.js:373:13)
    at Promise._withInput (/vagrant_host/ynab_shared_library/node_modules/phantomjs/node_modules/kew/kew.js:333:25)
    at Promise.resolve (/vagrant_host/ynab_shared_library/node_modules/phantomjs/node_modules/kew/kew.js:105:27)
    at resolver (/vagrant_host/ynab_shared_library/node_modules/phantomjs/node_modules/kew/kew.js:409:17)
    at next (/vagrant_host/ynab_shared_library/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.js:70:7)
    at CB (/vagrant_host/ynab_shared_library/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.js:106:9)
    at Object.oncomplete (fs.js:107:15)
npm ERR! Linux 3.2.0-23-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "phantomjs"
npm ERR! node v0.10.32
npm ERR! npm  v2.7.5
npm ERR! code ELIFECYCLE

npm ERR! phantomjs@1.9.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs@1.9.16 install script 'node install.js'.
npm ERR! 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 their info via:
npm ERR!     npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! Linux 3.2.0-23-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "phantomjs"
npm ERR! node v0.10.32
npm ERR! npm  v2.7.5
npm ERR! path npm-debug.log.d96adeda5efd8bee9b90041799f1e1c1
npm ERR! code ETXTBSY
npm ERR! errno 62

npm ERR! ETXTBSY, rename 'npm-debug.log.d96adeda5efd8bee9b90041799f1e1c1'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /vagrant_host/ynab_shared_library/npm-debug.log
prycec commented 9 years ago

We are seeing the same issue with 1.9.16 on Ubuntu 14.04

Our solution is to specify version 1.9.13 which passes the install.

Looks like an npm install -g; unable to check for already installed version. Download already available at /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2 Extracting tar contents (via spawned process) Removing /home/dmuser/projects/dr-runtime/node_modules/phantomjs/lib/phantom Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1429023230410/phantomjs-1.9.8-linux-x86_64 -> /home/dmuser/projects/dr-runtime/node_modules/phantomjs/lib/phantom Writing location.js file Phantom installation failed { [Error: ENOTDIR, not a directory '/home/dmuser/projects/dr-runtime/node_modules/phantomjs/lib/phantom/bin/phantomjs'] errno: 27, code: 'ENOTDIR', path: '/home/dmuser/projects/dr-runtime/node_modules/phantomjs/lib/phantom/bin/phantomjs', syscall: 'chmod' } Error: ENOTDIR, not a directory '/home/dmuser/projects/dr-runtime/node_modules/phantomjs/lib/phantom/bin/phantomjs' at Object.fs.chmodSync (evalmachine.:833:18) at Object.chmodSync (/home/dmuser/projects/dr-runtime/node_modules/phantomjs/node_modules/fs-extra/node_modules/graceful-fs/polyfills.js:141:17) at Promise.validExit as _successFn at Promise._call (/home/dmuser/projects/dr-runtime/node_modules/phantomjs/node_modules/kew/kew.js:373:13) at Promise._withInput (/home/dmuser/projects/dr-runtime/node_modules/phantomjs/node_modules/kew/kew.js:333:25) at Promise.resolve (/home/dmuser/projects/dr-runtime/node_modules/phantomjs/node_modules/kew/kew.js:105:27) at resolver (/home/dmuser/projects/dr-runtime/node_modules/phantomjs/node_modules/kew/kew.js:409:17) at next (/home/dmuser/projects/dr-runtime/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.js:70:7) at CB (/home/dmuser/projects/dr-runtime/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.js:106:9) at Object.oncomplete (fs.js:108:15)

npm ERR! phantomjs@1.9.16 install: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs@1.9.16 install script. npm ERR! 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 their info via: npm ERR! npm owner ls phantomjs npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.16.7-tinycore64 npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! cwd /home/dmuser/projects/dr-runtime npm ERR! node -v v0.10.36 npm ERR! npm -v 1.4.28 npm ERR! code ELIFECYCLE npm ERR! not ok code 0

Volker-E commented 9 years ago

Same here, 1.9.13 globally works. 1.9.16 doesn't.

nicks commented 9 years ago

The issue, as originally reported, was fixed. I'm locking this issue to prevent this from becoming a dumping ground for a broad swath of unrelated issues. If you would like us to look into a particular issue you're having, please file a separate issue.