1

This might be a noob question but I am really stuck and frustrated. Are many npm installations really buggy or I am missing anything?

This time I've tried

npm install grunt-contrib-imagemin -g

and the result is

...
npm http 304 http://registry.npmjs.org/cryptiles
npm http 304 http://registry.npmjs.org/graceful-fs

> [email protected] postinstall /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/gifsicle
> node lib/check.js


events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect ECONNREFUSED
    at errnoException (net.js:901:11)
    at Object.afterConnect [as oncomplete] (net.js:892:19)

> [email protected] postinstall /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/optipng-bin
> node lib/check.js



module.js:340
    throw err;
          ^
Error: Cannot find module 'json-stringify-safe'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object. (/usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js:19:22)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
npm ERR! EEXIST, mkdir '/usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random'
File exists: /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random
Move it away, and try again. 
npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-contrib-imagemin" "-g"
npm ERR! cwd /Users/dmitrizaitsev/Dropbox/Priv/APP
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! path /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random
npm ERR! fstream_path /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! [email protected] postinstall: `node lib/check.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the gifsicle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node lib/check.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls gifsicle
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-contrib-imagemin" "-g"
npm ERR! cwd /Users/dmitrizaitsev/Dropbox/Priv/APP
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/dmitrizaitsev/Dropbox/Priv/APP/npm-debug.log
npm ERR! not ok code 0

Any help as to what's going on here?

1 Answer 1

2

npm has issues from time to time. It serves A LOT of requests. Example from today: https://twitter.com/PeteRomano/status/423506485188911105

Whatever was causing that might also have caused your issue. Have you tried again recently?

Edit: fixed a typo

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.