通过NPM安装CoffeeScript时出现连接错误

时间:2012-06-14 10:15:18

标签: node.js coffeescript npm

尝试使用Node.js上的npm(版本1.1.24)(版本0.6.19)在websense代理后面的PC上的Windows XP(SP3)计算机上安装CoffeeScript。

我使用以下命令安装

npm install -g coffee-script

我收到了关注错误日志

info it worked if it ends with ok
verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
verbose cli   'install',
verbose cli   '-g',
verbose cli   'coffee-script' ]
info using npm@1.1.24
info using node@v0.6.19
verbose C:\Program Files\nodejs\\node.exe node symlink
verbose config file C:\Documents and Settings\peter.campbell\.npmrc
verbose config file C:\Program Files\nodejs\etc\npmrc
verbose config file C:\Program Files\nodejs\node_modules\npm\npmrc
verbose cache add [ 'coffee-script', null ]
silly cache add: name, spec, args [ undefined, 'coffee-script', [ 'coffee-script', null ] ]
verbose parsed url { pathname: 'coffee-script',
verbose parsed url   path: 'coffee-script',
verbose parsed url   href: 'coffee-script' }
verbose addNamed [ 'coffee-script', '' ]
verbose addNamed [ null, '' ]
silly name, range, hasData [ 'coffee-script', '', false ]
verbose raw, before any munging coffee-script
verbose url resolving [ 'https://registry.npmjs.org/', './coffee-script' ]
verbose url resolved https://registry.npmjs.org/coffee-script
http GET https://registry.npmjs.org/coffee-script
ERR! Error: connect ENETUNREACH
ERR!     at errnoException (net.js:670:11)
ERR!     at Object.afterConnect [as oncomplete] (net.js:661:19)
ERR! You may report this log at:
ERR!     <http://github.com/isaacs/npm/issues>
ERR! or email it to:
ERR!     <npm-@googlegroups.com>
ERR! 
ERR! System Windows_NT 5.1.2600
ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "coffee-script"
ERR! cwd Y:\
ERR! node -v v0.6.19
ERR! npm -v 1.1.24
ERR! syscall connect
ERR! code ENETUNREACH
ERR! message connect ENETUNREACH
ERR! errno {}
verbose exit [ 1, true ]

1 个答案:

答案 0 :(得分:2)

看起来工作区代理阻止了安装。我现在已成功使用npm在没有该网站限制性代理的2台Windows 7 PC上安装coffeescript。