我试图在heroku中部署我的节点应用程序,我收到此错误
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 :(得分:0)
CodeShip上也出现此问题。我认为这是一个NPM问题
答案 1 :(得分:0)
NPM有一个未解决的问题: