Repository: Medium/phantomjs

Issue #279: Installing phantomjs@1.9.14 fails
Created: 2015-01-27T15:39:10Z
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

Duplicate issue #280: 1.9.14 breaks on Linux when installing in local directory
Created: 2015-01-27T15:40:10Z
I am getting reliable failures with the 1.9.14 release when running npm install without a system-wide phantomjs binary. It looks like an expected path got fat-fingered.
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1422372975393/phantomjs-1.9.8-linux-x86_64 -> /home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Writing location.js file
Phantom installation failed { [Error: ENOTDIR, not a directory '/home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs']
  errno: 27,
  code: 'ENOTDIR',
  path: '/home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs',
  syscall: 'chmod' } Error: ENOTDIR, not a directory '/home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs'
    at Object.fs.chmodSync (evalmachine.<anonymous>:833:18)
    at Object.chmodSync (/home/christopher/git/caniprintit/caniprintit-resources/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] (/home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js:145:8)
    at Promise._call (/home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:373:13)
    at Promise._withInput (/home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:333:25)
    at Promise.resolve (/home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:105:27)
    at resolver (/home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:409:17)
    at CB (/home/christopher/git/caniprintit/caniprintit-resources/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.js:68:5)
    at Object.oncomplete (fs.js:108:15)

npm ERR! phantomjs@1.9.14 install: `node install.js`
npm ERR! Exit status 1

Closing comment (2015-01-27T15:50:12Z): dupe #279