2016-07-06 24 views
0

我試圖在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] 

回答

0

有在NPM是一個開放的問題,對於這一點:

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

+0

燁獲取這些包,看起來就是這樣。事實'npm install'在本地主機上完美運行(即使沒有緩存)也使我處於一個錯誤的軌道上。 –

+0

謝謝,現在這個問題已經被npm修復:) – Raghu

0

這個問題也發生在CodeShip。我認爲它是一種新公共管理問題

+1

我不認爲它的新公共管理問題,因爲我能在我的本地 – Raghu