Sporadic errors with npm install or npm pack a private npm package

We have sporadic errors with npm install and npm pack of a private npm package.

It looks like that sometime the tarball is not downloaded completely, but somehow makes it into the local cache. So that all subsequent calls to npm install or npm pack will end with the same failure,
error message is something like:

6 silly fetchPackageMetaData error for @raisin/raisin-frontend@4.4.0 Unexpected end of JSON input while parsing near '...r/JDOLF'


5 http fetch GET 200 https://registry.npmjs.org/@raisin%2fraisin-frontend 41ms (from cache)
6 silly fetchPackageMetaData error for @raisin/raisin-frontend@4.4.0 Unexpected end of JSON input while parsing near '...cker-webpack-plugin":'

We tried to break that down and directly curl the tarball from registry.npmjs.org, this randomly fails with the error message (about 1 of 30 times it fails):

curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)

The interesting thing is, that the HTTP return code is 200.

We tried it from different locations/ network setups, always with the same error, like from aws cloud, with a private internet connection at Berlin or at dedicated server in a datacenter in Dresden Germany. So its very unlikely an issue with our network.

Are there any known issues with the registry.npmjs.org for private packages or any other ideas whats going wrong there ?

No issues showing on the status page: https://status.npmjs.org

yes, there have been no issues on the status page. It was yesterday and the week before

Btw: We are using the latest node@10 lts. After updating to node 12 v12.12.0 and npm 6.12.1 and a npm cache clean --force, it looks like the annoying bug seems to be fixed, that a broken tarball made it into the cache.

Leaves the question, why fetching a tarball from registry.npmjs.org sometimes fails with this strange error.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.