在node.js中安装http-proxy模块需要帮助

时间:2012-10-29 16:39:41

标签: javascript node.js

我正在尝试在Node上安装http-proxy,所以我可以设置一个HTTPS代理,但运行时出现以下错误。有关如何获取http-proxy或任何其他建议如何使用node.js设置HTTPS代理的任何建议。提前致谢

npm install http-proxy

npm http GET https://registry.npmjs.org/http-proxy
npm http 304 https://registry.npmjs.org/http-proxy
npm ERR! Error: ENOTDIR, mkdir '/Users/rshroff/tmp/npm-15272/1351528387771-0.3611239262390882'
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 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "http-proxy"
npm ERR! cwd /Users/rshroff
npm ERR! node -v v0.8.10
npm ERR! npm -v 1.1.65
npm ERR! path /Users/rshroff/tmp/npm-15272/1351528387771-0.3611239262390882
npm ERR! code ENOTDIR
npm ERR! errno 27
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/rshroff/npm-debug.log
npm ERR! not ok code 0

1 个答案:

答案 0 :(得分:0)

Yaa,所以这里的问题是我的tmp目录没有写权限。很抱歉提出这么愚蠢的问题。