Having a bit of trouble with an NPM install of a project I'm working on.
The npm install works find when run inside a VM against package.json. However, when run from the host OSX machine (not shared folder or any conflicts like that) the install goes into a error loop.
Package.json:
{
"name": "crowdtutor",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-autoprefixer": "~0.4.0",
"grunt-bower-install": "~0.7.0",
"grunt-concurrent": "~0.4.1",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-coffee": "~0.7.0",
"grunt-contrib-compass": "~0.6.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-cssmin": "~0.7.0",
"grunt-contrib-htmlmin": "~0.1.3",
"grunt-contrib-imagemin": "~0.3.0",
"grunt-contrib-jshint": "~0.7.1",
"grunt-contrib-watch": "~0.5.2",
"grunt-google-cdn": "~0.2.0",
"grunt-karma": "^0.8.2",
"grunt-newer": "~0.5.4",
"grunt-ngmin": "~0.0.2",
"grunt-rev": "~0.1.0",
"grunt-svgmin": "~0.2.0",
"grunt-usemin": "~2.0.0",
"jshint-stylish": "~0.1.3",
"karma": "^0.12.1",
"karma-chrome-launcher": "^0.1.2",
"karma-jasmine": "^0.1.5",
"karma-ng-html2js-preprocessor": "^0.1.0",
"karma-ng-scenario": "^0.1.0",
"karma-phantomjs-launcher": "^0.1.2",
"load-grunt-tasks": "~0.2.0",
"time-grunt": "~0.2.1",
"compass": "^0.1.0",
"grunt-cli": "^0.1.13",
"mongo-hacker": "0.0.3"
},
"engines": {
"node": ">=0.8.0"
},
"scripts": {
"test": "grunt test"
}
}
.npmrc:
registry = http://registry.npmjs.org/
dev = true
#fetch-retries = 120
strict-ssl = false
#tmp = /Users/matt/.npmtmp
And (part of endlessly looping) output of npm install -g
:
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/matt/dev/crowdtutor/opa
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.10
npm ERR! path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/karma-coverage/node_modules/karma/node_modules/grunt-jscs-checker/node_modules/time-grunt/node_modules/text-table/node_modules/tap/test/deep.js
npm ERR! fstream_path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/karma-coverage/node_modules/karma/node_modules/grunt-jscs-checker/node_modules/time-grunt/node_modules/text-table/node_modules/tap/test/deep.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-html2js-preprocessor/node_modules/grunt-bump/node_modules/grunt-contrib-nodeunit/node_modules/hooker/node_modules/grunt/lib/grunt.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/matt/dev/crowdtutor/opa
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.10
npm ERR! path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-html2js-preprocessor/node_modules/grunt-bump/node_modules/grunt-contrib-nodeunit/node_modules/hooker/node_modules/grunt/lib/grunt.js
npm ERR! fstream_path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-html2js-preprocessor/node_modules/grunt-bump/node_modules/grunt-contrib-nodeunit/node_modules/hooker/node_modules/grunt/lib/grunt.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/karma-coverage/node_modules/karma/node_modules/grunt-jscs-checker/node_modules/vow/node_modules/jspath/node_modules/nodeunit'
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/karma-coverage/node_modules/karma/node_modules/grunt-jscs-checker/node_modules/vow/node_modules/jspath/node_modules/nodeunit']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/karma-coverage/node_modules/karma/node_modules/grunt-jscs-checker/node_modules/vow/node_modules/jspath/node_modules/nodeunit' }
npm http 200 http://registry.npmjs.org/serve-index
npm http 200 http://registry.npmjs.org/multiparty
npm http 304 http://registry.npmjs.org/hashish
npm http 304 http://registry.npmjs.org/findit
npm http 304 http://registry.npmjs.org/superagent
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/karma-coverage/node_modules/karma/node_modules/grunt-jscs-checker/node_modules/vow/node_modules/jspath/node_modules/cliff/test/cliff-test.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/matt/dev/crowdtutor/opa
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.10
npm ERR! path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/karma-coverage/node_modules/karma/node_modules/grunt-jscs-checker/node_modules/vow/node_modules/jspath/node_modules/cliff/test/cliff-test.js
npm ERR! fstream_path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/karma-coverage/node_modules/karma/node_modules/grunt-jscs-checker/node_modules/vow/node_modules/jspath/node_modules/cliff/test/cliff-test.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, utime '/usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-html2js-preprocessor/node_modules/grunt-bump/node_modules/grunt-contrib-nodeunit/node_modules/tap/node_modules/glob/node_modules/rimraf/fiber.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/matt/dev/crowdtutor/opa
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.10
npm ERR! path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-html2js-preprocessor/node_modules/grunt-bump/node_modules/grunt-contrib-nodeunit/node_modules/tap/node_modules/glob/node_modules/rimraf/fiber.js
npm ERR! fstream_path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-html2js-preprocessor/node_modules/grunt-bump/node_modules/grunt-contrib-nodeunit/node_modules/tap/node_modules/glob/node_modules/rimraf/fiber.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call utimes
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET http://registry.npmjs.org/emitter-component
npm http GET http://registry.npmjs.org/cookiejar
npm http GET http://registry.npmjs.org/methods
npm http GET http://registry.npmjs.org/reduce-component
npm http GET http://registry.npmjs.org/better-assert
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/chai/node_modules/mocha-phantomjs/node_modules/requirejs/bin/r.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/matt/dev/crowdtutor/opa
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.10
npm ERR! path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/chai/node_modules/mocha-phantomjs/node_modules/requirejs/bin/r.js
npm ERR! fstream_path /usr/local/lib/node_modules/crowdtutor/node_modules/karma-ng-scenario/node_modules/karma/node_modules/chai/node_modules/mocha-phantomjs/node_modules/requirejs/bin/r.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/crowdtutor/node_modules/grunt-newer/node_modules/grunt-cli/node_modules/findup-sync/node_modules/grunt/node_modules/glob/node_modules/tap/node_modules/glob/node_modules/minimatch/node_modules/sigmund/node_modules/tap'
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/crowdtutor/node_modules/grunt-newer/node_modules/grunt-cli/node_modules/findup-sync/node_modules/grunt/node_modules/glob/node_modules/tap/node_modules/glob/node_modules/minimatch/node_modules/sigmund/node_modules/tap']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/crowdtutor/node_modules/grunt-newer/node_modules/grunt-cli/node_modules/findup-sync/node_modules/grunt/node_modules/glob/node_modules/tap/node_modules/glob/node_modules/minimatch/node_modules/sigmund/node_modules/tap' }
npm http 304 http://registry.npmjs.org/express
npm http 304 http://registry.npmjs.org/utest
npm http 304 http://registry.npmjs.org/underscore
npm http 304 http://registry.npmjs.org/gently
npm http 200 http://registry.npmjs.org/d-utils
npm ERR! Error: ENOENT, utime '/usr/local/lib/node_modules/crowdtutor/node_modules/grunt-bower-install/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/rimraf/fiber.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/matt/dev/crowdtutor/opa
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.10
npm ERR! path /usr/local/lib/node_modules/crowdtutor/node_modules/grunt-bower-install/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/rimraf/fiber.js
npm ERR! fstream_path /usr/local/lib/node_modules/crowdtutor/node_modules/grunt-bower-install/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/rimraf/fiber.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call utimes
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET http://registry.npmjs.org/qs
npm http 304 http://registry.npmjs.org/wordwrap
npm http 304 http://registry.npmjs.org/color-parser
npm http 200 http://registry.npmjs.org/oop/-/oop-0.0.3.tgz
npm http 304 http://registry.npmjs.org/css
npm http 304 http://registry.npmjs.org/mime
npm http GET http://registry.npmjs.org/temp
npm http GET http://registry.npmjs.org/fstream
npm http GET http://registry.npmjs.org/binary
npm http 304 http://registry.npmjs.org/body-parser
npm http 304 http://registry.npmjs.org/rework-visit
npm http 304 http://registry.npmjs.org/bytes
npm http 304 http://registry.npmjs.org/rework-inherit
npm http 304 http://registry.npmjs.org/express-session
My NODE_PATH is set to
/usr/local/bin/node
Node was installed via brew and i'm on Mavericks OSX.
I have run npm cache clean
and am confident it isn't a permissions issue anywhere. To my eyes, there seems to be some cyclic :node_modules: directory building there? Help!
Having stumbled upon the very same issue you have, I brute-force fixed it with:
$ rm -r $HOME/.npm
# If the above fails, you can force remove this directory.
# BE CAREFUL though. If you make a typo, you can end up
# deleting files you care about.
$ rm -rf $HOME/.npm
followed by
npm cache clean
npm install -g grunt-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With