【发布时间】:2014-02-04 10:57:56
【问题描述】:
这可能是一个菜鸟问题,但我真的很困惑和沮丧。许多npm 安装真的有问题还是我遗漏了什么?
这次我试过了
npm install grunt-contrib-imagemin -g
结果是
... npm http 304 http://registry.npmjs.org/cryptiles npm http 304 http://registry.npmjs.org/graceful-fs > gifsicle@0.1.4 安装后 /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/gifsicle > 节点库/check.js 事件.js:72 投掷者; // 未处理的“错误”事件 ^ 错误:连接 ECONNREFUSED 在 errnoException (net.js:901:11) 在 Object.afterConnect [as oncomplete] (net.js:892:19) > optipng-bin@0.3.1 安装后 /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/optipng-bin > 节点库/check.js 模块.js:340 抛出错误; ^ 错误:找不到模块“json-stringify-safe” 在 Function.Module._resolveFilename (module.js:338:15) 在 Function.Module._load (module.js:280:25) 在 Module.require (module.js:364:17) 在需要 (module.js:380:17) 在对象。 (/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) 在 Module._compile (module.js:456:26) 在 Object.Module._extensions..js (module.js:474:10) 在 Module.load (module.js:356:32) 在 Function.Module._load (module.js:312:12) 在 Module.require (module.js:364:17) npm 错误! 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' 文件存在:/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 错误!系统达尔文 12.5.0 npm 错误!命令“节点”“/usr/local/bin/npm”“安装”“grunt-contrib-imagemin”“-g” npm 错误! cwd /用户/dmitrizaitsev/Dropbox/Priv/APP npm 错误!节点-v v0.10.24 npm 错误! npm -v 1.3.21 npm 错误!路径 /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 错误! 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 错误! fstream_type 文件 npm 错误! fstream_class FileWriter npm 错误!代码 EEXIST npm 错误!错误号 47 npm 错误! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23 npm 错误! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53 npm 错误! fstream_stack Object.oncomplete (fs.js:107:15) npm 错误! gifsicle@0.1.4 安装后:`node lib/check.js` npm 错误!退出状态 8 npm 错误! npm 错误!在 gifsicle@0.1.4 安装后脚本中失败。 npm 错误!这很可能是 gifsicle 包的问题, npm 错误!不是 npm 本身。 npm 错误!告诉作者这在您的系统上失败: npm 错误!节点库/check.js npm 错误!您可以通过以下方式获取他们的信息: npm 错误! npm 所有者 ls gifsicle npm 错误!上面可能有额外的日志输出。 npm 错误!系统达尔文 12.5.0 npm 错误!命令“节点”“/usr/local/bin/npm”“安装”“grunt-contrib-imagemin”“-g” npm 错误! cwd /用户/dmitrizaitsev/Dropbox/Priv/APP npm 错误!节点-v v0.10.24 npm 错误! npm -v 1.3.21 npm 错误!代码生命周期 npm 错误! npm 错误!可以在以下位置找到其他日志记录详细信息: npm 错误! /Users/dmitrizaitsev/Dropbox/Priv/APP/npm-debug.log npm 错误!不好的代码 0对这里发生的事情有任何帮助吗?
【问题讨论】: