karma-runner / karma-phantomjs-launcher

A Karma plugin. Launcher for PhantomJS.
MIT License
281 stars 131 forks source link

install error #62

Open nakie opened 9 years ago

nakie commented 9 years ago

I'm trying to setup an angular dev environment using angular-seed inside a vagrant box ( running Ubuntu 12.02 32 Bit / precise32 ) on Windows 7. When I download the angular-seed project and run npm install --no-bin-links I get an error related to phantomJS, Reading through the error shows phantomJS install had an issue with karma-phantomjs-launcher directories not being present. It appears to be happening during the karma-phantomjs-launcher install, so I thought i would start here.

Here is the result of running the install on its own outside of angular-seeds npm install script.

vagrant@precise32:/vagrant$ npm install karma-phantomjs-launcher --no-bin-links
npm WARN package.json karma-chrome-launcher@0.1.7 No README data
npm WARN package.json karma-firefox-launcher@0.1.4 No README data
Phantom installation failed { [Error: ENOTDIR, not a directory '/vagrant/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs']
  errno: 27,
  code: 'ENOTDIR',
  path: '/vagrant/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs',
  syscall: 'chmod' } Error: ENOTDIR, not a directory '/vagrant/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs'
    at Object.fs.chmodSync (evalmachine.<anonymous>:833:18)
    at Object.chmodSync (/vagrant/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] (/vagrant/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js:145:8)
    at Promise._call (/vagrant/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:373:13)
    at Promise._withInput (/vagrant/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:333:25)
    at Promise.resolve (/vagrant/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:105:27)
    at resolver (/vagrant/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js:409:17)
    at next (/vagrant/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/rimraf.js:70:7)
    at CB (/vagrant/node_modules/karma-phantomjs-launcher/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.2.0-23-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "karma-phantomjs-launcher" "--no-bin-links"
npm ERR! cwd /vagrant
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Thanks -Nathan

brunowego commented 9 years ago

+1

dignifiedquire commented 9 years ago

This is probably an issue with npm + vagrant, which there are many of sadly. Please try running the install in a folder that is not mounted like the home directory and upgrade your npm to the latest version via npm update -g npm