首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NPM安装错误-“奇怪的错误8",”抛出;

NPM安装错误-“奇怪的错误8",”抛出;
EN

Stack Overflow用户
提问于 2014-03-18 10:39:30
回答 1查看 3K关注 0票数 0

当我试图安装grunt-contrib-imagemin@0.4.1时,我会得到这些错误(在终端中);

代码语言:javascript
复制
> optipng-bin@0.3.1 postinstall /Users/<omitted>/Workspace/<omitted>/server/public/angular/node_modules/grunt-contrib-imagemin/node_modules/optipng-bin
> node lib/check.js


events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: tunneling socket could not be established, cause=connect EHOSTUNREACH
    at ClientRequest.onError (/Users/<omitted>/Workspace/<omitted>/server/public/angular/node_modules/grunt-contrib-imagemin/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js:159:17)
    at ClientRequest.g (events.js:175:14)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at CleartextStream.socketErrorListener (http.js:1528:9)
    at CleartextStream.EventEmitter.emit (events.js:95:17)
    at Socket.onerror (tls.js:1424:17)
    at Socket.EventEmitter.emit (events.js:117:20)
    at net.js:441:14
    at process._tickCallback (node.js:415:13)
unbuild optipng-bin@0.3.1

> gifsicle@0.1.4 postinstall /Users/<omitted>/Workspace/<omitted>/server/public/angular/node_modules/grunt-contrib-imagemin/node_modules/gifsicle
> node lib/check.js


events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: tunneling socket could not be established, cause=connect EHOSTUNREACH
    at ClientRequest.onError (/Users/<omitted>/Workspace/<omitted>/server/public/angular/node_modules/grunt-contrib-imagemin/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js:159:17)
    at ClientRequest.g (events.js:175:14)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at CleartextStream.socketErrorListener (http.js:1528:9)
    at CleartextStream.EventEmitter.emit (events.js:95:17)
    at Socket.onerror (tls.js:1424:17)
    at Socket.EventEmitter.emit (events.js:117:20)
    at net.js:441:14
    at process._tickCallback (node.js:415:13)
unbuild gifsicle@0.1.4
unbuild grunt-contrib-imagemin@0.4.1
npm ERR! Error: ENOENT, open '/Users/<omitted>/Workspace/<omitted>/server/public/angular/node_modules/grunt-contrib-imagemin/node_modules/pngquant-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/local/Cellar/node/0.10.13/bin/node" "/usr/local/bin/npm" "install" "grunt-contrib-imagemin@0.4.1" "--save-dev"
npm ERR! cwd /Users/<omitted>/Workspace/<omitted>/server/public/angular
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! path /Users/<omitted>/Workspace/<omitted>/server/public/angular/node_modules/grunt-contrib-imagemin/node_modules/pngquant-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! weird error 8

npm-debug.log文件如下所示;

代码语言:javascript
复制
16117 error Error: ENOENT, utime '/var/folders/1m/0y7hjtm94rdcpk3frnf43d2c0000gx/T/npm-69757/1395137735074-0.018615296110510826/package/README.md'
16118 error If you need help, you may report this log at:
16118 error     <http://github.com/isaacs/npm/issues>
16118 error or email it to:
16118 error     <npm-@googlegroups.com>
16119 error System Darwin 13.1.0
16120 error command "/usr/local/Cellar/node/0.10.13/bin/node" "/usr/local/bin/npm" "install" "grunt-contrib-imagemin@0.4.1" "--save-dev"
16121 error cwd /Users/<omitted>/Workspace/<omitted>/server/public/angular
16122 error node -v v0.10.13
16123 error npm -v 1.3.2
16124 error path /var/folders/1m/0y7hjtm94rdcpk3frnf43d2c0000gx/T/npm-69757/1395137735074-0.018615296110510826/package/README.md
16125 error fstream_path /var/folders/1m/0y7hjtm94rdcpk3frnf43d2c0000gx/T/npm-69757/1395137735074-0.018615296110510826/package/README.md
16126 error fstream_type File
16127 error fstream_class FileWriter
16128 error fstream_finish_call utimes
16129 error code ENOENT
16130 error errno 34
16131 error fstream_stack /usr/local/Cellar/node/0.10.13/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
16131 error fstream_stack Object.oncomplete (fs.js:107:15)
16132 verbose exit [ 34, true ]

怎么了?奇怪的是,我今天早些时候安装了grunt-contrib-imagemin,但为了获得0.4.1而不是0.5.0而卸载了它。现在我根本无法重新安装任何版本。

我做了一个

代码语言:javascript
复制
rm -rd node_modules/
npm install

只为了清理node_modules文件夹。还是不起作用。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-03-18 12:48:04

公司代理设置错误(http_proxyhttps_proxy env变量)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22476859

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档