Google engine 502 bad gateway during fetch npm package

google-app-enginegoogle-compute-enginenode.jsnpm

I'm getting weird 502 error while trying to fetch npm package inside of google service instance.

Error is constantly repeating on Google App Engine (Docker container deployment procedure), and Google Compute Engine instance (while trying to simple GET with curl or wget).

  1. yesterday all works fine, nothing changed in configs
  2. error happened on both urls: [http/https]://registry.npmjs.org
  3. can't get only .gz files and only from registry, plain html page (like registry main page) returns "200 OK" status

Here is log: http://pastebin.com/wGZ50Qrz

Best Answer

Though this question is a little old, this was an issue with the NPM registry that affect 0.5% of all package tarballs. The error was born of a discrepancy between Nginx's ETags and the NPM CDN's use of cache headers. The outage began on the evening of July 1, 2016 and ended around 9:00 PDT on July 6 5 days laters. A full summary can be found on NPM's blog article package tarball read outage today.

As per othiym23's comment on the related NPM Github issue 13284, if you encounter further issues that return similar 502s, feel free to report this new issue at the NPM registry issue tracker or otherwise contact the NPM support team at support@npmjs.com.