npm install 后 NPM package.json 未更新 [英] NPM package.json not updating after npm install
问题描述
我有 package.json:
i have package.json:
{
"dependencies":{
"package": "^3.3.0"
}
}
当我将此 package.json 传输到另一个文件夹并运行 npm install
when i transfer this package.json in another folder and run npm install
我得到相同的 package.json 即使它应该将包更新到 3.3.2
i get the same package.json even though it should update package to 3.3.2
但是当我运行 npm list 版本是 3.3.2
所以我的问题是,为什么 package.json 没有更新?
but when i run npm list version is 3.3.2
So my question is, why is package.json not updating ?
推荐答案
我刚刚遇到了类似的问题.我的解决方案记录在这里:npm install NOT dowloading latest package
I just experience a similar issue. My solution is documented here: npm install NOT dowloading latest package
我认为 npm update
应该可以解决您的问题.您还会发现 npm outdated
命令非常有用.
I think npm update
should resolve your issue.
You will also find npm outdated
command quite useful.
这篇关于npm install 后 NPM package.json 未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!