While working with NPM and its cache, I noticed that -sometimes- when the newest version of a certain package is not in the cache, npm ci errors out without bypassing NPM cache.
Is there a way to tell NPM something like "If the package you're looking for is not in the cache, then bypass the cache and try again"?
Thanks in advance.
On a cache miss,
npmwill go to the registry. Cache corruption can cause weirdness, although recent versions ofnpmhandle cache corruption fairly robustly. When in doubt, as you mention in your comment, deleting the cache can fix things, although thenpmdocs suggest avoiding it if at all possible. Usenpm cache clean(ornpm cache clearornpm cache rm) to clear the cache.