npm错误:无法建立隧道套接字,因为= connect ETIMEDOUT

时间:2015-10-24 20:04:33

标签: ruby-on-rails heroku command-line terminal npm

我有一个使用Rails框架的应用程序,并将AngularJs作为前端的一部分实现。

我已将所有内容都推送到Heroku并安装了Heroku Toolbelt,但当我尝试使用&#34迁移数据库时,heroku运行rake db:migrate"我收到以下错误:

Installing core plugins heroku-cli-addons, heroku-apps, heroku-fork, heroku-git, heroku-local, heroku-run, heroku-status...
Error installing package. Try running again with GODE_DEBUG=info to see more output.
 !    `run` is not a heroku command.
 !    Perhaps you meant `-h`, `2fa`, `auth`, `join`, `open`, `orgs`, `pg`, `ps` or `rake`.
 !    See `heroku help` for a list of available commands.
  

然后我运行命令" GODE_DEBUG = info heroku run rake db:migrate"并收到此错误:

npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/Christopher_Pelnar/.heroku/node-v4.2.1-darwin-x64/bin/node" "/Users/Christopher_Pelnar/.heroku/node-v4.2.1-darwin-x64/lib/node_modules/npm/cli.js" "install" "heroku-cli-addons" "heroku-apps" "heroku-fork" "heroku-git" "heroku-local" "heroku-run" "heroku-status" "--loglevel=info"
npm ERR! node v4.2.1
npm ERR! npm  v3.3.8
npm ERR! code ECONNRESET

npm ERR! network tunneling socket could not be established, cause=connect ETIMEDOUT 198.105.254.228:8080
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Christopher_Pelnar/.heroku/npm-debug.log

2 个答案:

答案 0 :(得分:4)

删除代理设置解决了问题:

npm config rm proxy
npm config rm https-proxy

答案 1 :(得分:0)

npm config set registry=http://registry.npmjs.org/ npm config set strict-ssl false

这对我有用!