npm install 后 NPM package.json 未更新 [英] NPM package.json not updating after npm install

查看:194
本文介绍了npm install 后 NPM package.json 未更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆