The problem:
sometimes I run
npm install x@latest
but it doesn't actually pull the latest version of the package (that is lame).
However, if I do:
npm cache clean --force && npm install x@latest
it will pull the latest
but I actually would rather avoid deleting the whole cache and just delete the cache for a single package, e.g.:
npm cache clean x --force
but that doesn't seem to be allowed. Anyone know a good workaround?
perhaps simply:
rm -rf $HOME/.npm/x
?
I faced that issue, my current workaround is to upgrade the package again. as the
shais changed during installation, it will automatically pull the package and update the cache, I tested withyarnand it works, haven't tested withnpmbut I assume it will work as expected.for npm:
for yarn