Cannot install latest version of an npm package, possibly caching 4xx from NPM
See original GitHub issueThis is a re-issue of #491, because the problem did not go away by itself.
Basically:
- Add a package to a blitz
- I think you need to attempt to install a new version explicitly before publishing or before publish has propagated. I am pretty sure I did that.
- Publish a new version to NPM
- StackBlitz cannot find the new version when you try to install it, explicitly or through an update.
Example blitz where this is happening:
- https://stackblitz.com/edit/angular-7fkpzq-y7hb79
- Has version
ng2-dragula@2.0.1
, we want to upgrade tong2-dragula@2.0.2
2.0.2
was published 5 days ago, and the blitz is still stuck.- I can install
v2.0.2-0
just fine, explicitly or with the@next
dist-tag.
Step 4 is impossible to achieve. Here are 3 ways you might try:
- If you refresh, it does not find the new version.
- If you delete and re-add, it does not find the new version.
- If you delete and re-add with an explicit version like
ng2-dragula@2.0.2
, the UI comes up with an error saying “Failure: unsatisfied version range. Unable to resolve packageng2-dragula@2.0.2
”.
That Step 2 is necessary leads me to believe that StackBlitz/turbo is caching 4xx/5xx responses from NPM, which is wrong.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:71 (11 by maintainers)
Top Results From Across the Web
Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. This can be caused by...
Read more >How to solve npm install error “npm ERR! code 1”
If your Node.js version is very recent, try downgrading. The stable version 14.16.1 worked.
Read more >Blog - Next.js 13
Next.js 13 and the pages directory are stable and ready for production. Update today by running: npm i next@latest react@latest ...
Read more >hikvision node red
The Picture node is not able to retrieve any picture from the camera, the flow ... including node-red-contrib-hikvision with all npm packages installed....
Read more >Xendit API Reference
You can install our Node.js library using npm npm install xendit-node or check out the ... All new features will be released to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Man, seems like npm’s throttling/caching has gotten worse recently. We’re working on a fix- will post back when we’re close to shipping it
We are working on resolving this issue. Unfortunately the mechanisms that we relied on previously from npm are proving to be much less reliable than before. Currently it seems that the npmjs eventual consistency model has been increasing the “eventual” part of the approach. We have been running into issues where we receive a “webhook” call from them that a package has been updated and then when we go to update our cache, the new version is not yet available. As a result, our package resolution cache becomes one step behind. Previously this would happen very sporadically, but recently it is unfortunately becoming quite common. Resolving this is not as straightforward as it may seem from the outside. The caching mechanism is one of the key factors that enables the blistering speed that turbo has to offer and we cannot just call npm whenever we want to (we would very quickly be rate-limited). We are currently looking at ways that we can keep our cache consistently in sync with these constraints and will keep this issue updated with the progress.