Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
问题:
有时我跑
npm install x@latest
但它实际上并没有拉取最新版本的软件包(那是蹩脚的)。
但是,如果我这样做:
npm cache clean --force && npm install x@latest
它将拉出最新的
但我实际上宁愿避免删除整个缓存而只删除单个包的缓存,例如:
npm cache clean x --force
但这似乎是不允许的。有人知道一个好的解决方法吗?
也许很简单:
rm -rf $HOME/.npm/x
?
我遇到了这个问题,我目前的解决方法是再次升级包。由于sha在安装过程中更改了,它会自动拉取包并更新缓存,我测试过yarn它可以工作,还没有测试过,npm但我认为它会按预期工作。
sha
yarn
npm
对于 npm:
npm update x@latest
用于纱线
yarn upgrade-interactive --latest