问题
i have package.json:
{
"dependencies":{
"package": "^3.3.0"
}
}
when i transfer this package.json in another folder and run npm install
i get the same package.json even though it should update package to 3.3.2
but when i run npm list version is 3.3.2
So my question is, why is package.json not updating ?
回答1:
I just experience a similar issue. My solution is documented here: npm install NOT dowloading latest package
I think npm update
should resolve your issue.
You will also find npm outdated
command quite useful.
来源:https://stackoverflow.com/questions/51529421/npm-package-json-not-updating-after-npm-install