的Heroku的NodeJS包下载失败

问题描述:

我试图在Heroku上部署我节点应用,我得到这个错误的Heroku的NodeJS包下载失败

remote: Compressing source files... done. 
remote: Building source: 
remote: 
remote: -----> Fetching set buildpack https://github.com/jasonswett/heroku-buildpack-nodejs... done 
remote: -----> Node.js app detected 
remote: 
remote: -----> Creating runtime environment 
remote:   
remote:  NPM_CONFIG_LOGLEVEL=error 
remote:  NPM_CONFIG_PRODUCTION=true 
remote:  NODE_ENV=production 
remote:  NODE_MODULES_CACHE=true 
remote: 
remote: -----> Installing binaries 
remote:  engines.node (package.json): 4.4.0 
remote:  engines.npm (package.json): 3.9.6 
remote:   
remote:  Downloading and installing node 4.4.0... 
remote:  Downloading and installing npm 3.9.6 (replacing version 2.14.20)... 
remote: 
remote: -----> Restoring cache 
remote:  Skipping cache restore (new runtime signature) 
remote: 
remote: -----> Building dependencies 
remote:  Pruning any extraneous modules 
remote:  Installing node modules (package.json) 
remote:  npm ERR! fetch failed https://registry.npmjs.org/escape-regexp/-/escape-regexp-0.0.1.tgz 
remote:  npm ERR! fetch failed https://registry.npmjs.org/escape-regexp/-/escape-regexp-0.0.1.tgz 
remote:  npm ERR! fetch failed https://registry.npmjs.org/escape-regexp/-/escape-regexp-0.0.1.tgz 
remote:  npm ERR! Linux 3.13.0-91-generic 
remote:  npm ERR! argv "/tmp/build_27e444d734bb50f3b3df0b13bc50d093/client/.heroku/node/bin/node" "/tmp/build_27e444d734bb50f3b3df0b13bc50d093/client/.heroku/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/build_27e444d734bb50f3b3df0b13bc50d093/client/.npmrc" 
remote:  npm ERR! node v4.4.0 
remote:  npm ERR! npm v3.9.6 
remote:   
remote:  npm ERR! fetch failed with status code 502 
remote:  npm ERR! 
remote:  npm ERR! If you need help, you may report this error at: 
remote:  npm ERR!  <https://github.com/npm/npm/issues> 
remote:   
remote:  npm ERR! Please include the following file with any support request: 
remote:  npm ERR!  /tmp/build_27e444d734bb50f3b3df0b13bc50d093/client/npm-debug.log 
remote: 
remote: -----> Build failed 
remote:   
remote:  We're sorry this build is failing! You can troubleshoot common issues here: 
remote:  https://devcenter.heroku.com/articles/troubleshooting-node-deploys 
remote:   
remote:  If you're stuck, please submit a ticket so we can help: 
remote:  https://help.heroku.com/ 
remote:   
remote:  Love, 
remote:  Heroku 
remote:   
remote: 
remote: !  Push rejected, failed to compile Node.js app 
remote: 

我尝试使用heroku run bash命令 登录Heroku的bash和尝试这种

~ $ wget https://registry.npmjs.org/escape-regexp/-/escape-regexp-0.0.1.tgz 
--2016-07-06 07:13:55-- https://registry.npmjs.org/escape-regexp/-/escape-regexp-0.0.1.tgz 
Resolving registry.npmjs.org (registry.npmjs.org)... 151.101.20.162 
Connecting to registry.npmjs.org (registry.npmjs.org)|151.101.20.162|:443... connected. 
HTTP request sent, awaiting response... 502 Bad Gateway 
2016-07-06 07:13:55 ERROR 502: Bad Gateway. 

这是502坏的网关是什么意思,在我的本地,如果我试图让这个包的工作

P.S在Heroku的其他所有网址,我是能够访问

~ $ wget https://registry.npmjs.org/ 
--2016-07-06 08:08:53-- https://registry.npmjs.org/ 
Resolving registry.npmjs.org (registry.npmjs.org)... 151.101.20.162 
Connecting to registry.npmjs.org (registry.npmjs.org)|151.101.20.162|:443... connected. 
HTTP request sent, awaiting response... 200 OK 
Length: 262 [text/plain] 
Saving to: ‘index.html’ 

100%[===========================================================================================================================================>] 262   --.-K/s in 0s  

2016-07-06 08:08:54 (45.8 MB/s) - ‘index.html’ saved [262/262] 

有在NPM是一个开放的问题,对于这一点:

https://github.com/npm/npm/issues/13284

+0

烨获取这些包,看起来就是这样。事实'npm install'在本地主机上完美运行(即使没有缓存)也使我处于一个错误的轨道上。 –

+0

谢谢,现在这个问题已经被npm修复:) – Raghu

这个问题也发生在CodeShip。我认为它是一种新公共管理问题

+1

我不认为它的新公共管理问题,因为我能在我的本地 – Raghu