Npm MAC Error with ENOENT

I am converting to Mac from Windows recently and am currently just trying to customize my tools.

I first installed node using homebrew, which gave me errors (same as mine). I later uninstalled the node using homebrew and installed using pkg from the node website.

I can access node on the command line and npm. The problem is that when I try to install the modules in the project locally, I get something like:

npm install grunt-contrib

 Error extracting archive { [Error: ENOENT, open '/Users/davidmckeown/dev/adt-com/node_modules/grunt-contrib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx.zip'] errno: 34, code: 'ENOENT', path: '/Users/davidmckeown/dev/adt-com/node_modules/grunt-contrib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx.zip' } 

Another post above that contains:

 npm ERR! phantomjs@0.2.6 install: `node install.js` npm ERR! `sh "-c" "node install.js"` failed with 8 npm ERR! npm ERR! Failed at the phantomjs@0.2.6 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 Darwin 12.2.1 npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-contrib" npm ERR! cwd /Users/davidmckeown/dev/adt-com npm ERR! node -v v0.10.0 npm ERR! npm -v 1.2.14 npm ERR! code ELIFECYCLE 

Any help in figuring out what is causing the problems here would be fantastic. This happens with other modules, from what I can say.

+7
source share
2 answers

npm cache clean

or if it is installed under su

sudo npm cache clean

+27
source

There was a problem 5 months ago with the grunt qunit package - https://github.com/gruntjs/grunt-lib-phantomjs/issues/5 .

Try installing this specific package:

sudo npm install grunt-contrib-qunit

The package you installed is a collection of many packages. The version of the qunit package has not been explicitly upgraded to the latest version of this package, so resolving this issue may result in clearing the npm cache.

+1
source

All Articles