npm ERR! fetch failed status code 502

大城市里の小女人 提交于 2019-12-08 07:40:36

问题


I'm using Codeship to deploy my Ember project to Heroku. These deployments used to work without a problem but since yesteday they fail with "npm ERR! fetch failed ..." when installing the npm dependencies in step (6). I haven't changed anything since then and resetting the dependency cache has not helped.

Anyone familiar with this issue?

I'm using:

ember-cli 3.3.12

npm v3.8.6

node v5.11.1

- ...
- (step 1) ember test
- (step 2) Exporting Heroku API Key
- (step 3) check_access_to_heroku_app my_project
- (step 4) Preparing repository for Heroku deployment
- (step 5) git remote add heroku_my_project git@heroku.com:my_project.git
- (step 6) git push heroku_tnt-ui $CI_COMMIT_ID:refs/heads/master

---- Log of Step 6 -----

Counting objects: 69, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (36/36), 6.48 KiB | 0 bytes/s, done.
Total 36 (delta 23), reused 31 (delta 19)
remote: Compressing source files... done.

remote: Building source:

remote: 
remote: -----> Fetching set buildpack https://github.com/tonycoco/heroku-buildpack-ember-cli.git... done

remote: -----> Ember CLI app detected

remote: -----> Exporting config vars to environment

remote: -----> Building environment: production

remote: 
remote:        PRO TIP: Avoid using semver ranges starting with '>' in engines.node

remote:        See https://devcenter.heroku.com/articles/nodejs-support

remote: 
remote: -----> Requested node range:  >= 0.10.0

remote: -----> Resolved node version: 5.11.1

remote: -----> Downloading and installing node

remote: -----> Using default npm version: 3.8.6

remote: -----> Downloading and installing nginx

remote: -----> Adding boot script

remote: -----> Copying configs

remote: -----> Forcing rebuild of all node_modules. Pruning all node_modules.

remote: -----> Forcing re-installation of all bower_components. Pruning all bower_components.

remote: -----> Creating node_modules cache directory

remote: -----> Creating bower_components cache directory

remote: -----> Pruning cached dependencies not specified in package.json

remote: -----> Installing dependencies

remote:        npm ERR! fetch failed https://registry.npmjs.org/ember-cli-sri/-/ember-cli-sri-2.1.0.tgz

remote:        npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502

remote:        npm ERR! fetch failed https://registry.npmjs.org/ember-simple-auth/-/ember-simple-auth-1.1.0.tgz

remote:        npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502

remote:        npm ERR! fetch failed https://registry.npmjs.org/ember-cli-sri/-/ember-cli-sri-2.1.0.tgz

remote:        npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502

remote:        npm ERR! fetch failed https://registry.npmjs.org/ember-simple-auth/-/ember-simple-auth-1.1.0.tgz

remote:        npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 502

remote:        npm ERR! fetch failed https://registry.npmjs.org/ember-cli-sri/-/ember-cli-sri-2.1.0.tgz

remote:        npm ERR! fetch failed https://registry.npmjs.org/ember-simple-auth/-/ember-simple-auth-1.1.0.tgz

remote:        npm ERR! Linux 3.13.0-91-generic

remote:        npm ERR! argv "/tmp/build_aaa68782965ff56ab3bc/vendor/node/bin/node" "/tmp/build_aaa6878296554310746bc/vendor/node/bin/npm" "install" "--quiet" "--no-optional" "--userconfig" "/tmp/build_aaa6875446ff56ab3bc/.npmrc"

remote:        npm ERR! node v5.11.1

remote:        npm ERR! npm  v3.8.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_aaa687829655456ab3bc/npm-debug.log

remote: 0 info it worked if it ends with ok

remote: 1 verbose cli [ '/tmp/build_aaa68782965546ab3bc/vendor/node/bin/node',

remote: 1 verbose cli   '/tmp/build_aaa687846ff56ab3bc/vendor/node/bin/npm',

remote: 1 verbose cli   'install',

remote: 1 verbose cli   '--quiet',

remote: 1 verbose cli   '--no-optional',

remote: 1 verbose cli   '--userconfig',

remote: 1 verbose cli   '/tmp/build_aaa68782b46ff56ab3bc/.npmrc' ]

remote: 2 info using npm@3.8.6

remote: 3 info using node@v5.11.1

remote: 4 verbose config Skipping project config: /tmp/build_aaa6878296f56ab3bc/.npmrc. (matches userconfig)

remote: 5 silly loadCurrentTree Starting

remote: 6 silly install loadCurrentTree

remote: 7 silly install readLocalPackageData

remote: 8 silly install normalizeTree

...

回答1:


This was a bug on npm's server side and got fixed a day later.



来源:https://stackoverflow.com/questions/38218673/npm-err-fetch-failed-status-code-502

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!