问题描述
我已将 Visual Studio 2017 模板中的 angular 4 更新为 angular 5.
我按照链接中的说明进行操作
从图中右侧包更新到 5.5.1,但 npm 依赖项仍然指向旧版本.
如何解决这个问题.
我遇到了同样的问题,并采取以下步骤解决了它:
- 删除npm-shrinkwrap.json文件(展开package.json文件查看)
- 删除项目文件夹中的 node_modules 文件夹
重新安装 npm:
npm install -g npm-check-updates
I have updated the angular 4 to angular 5 in visual studio 2017 template.
I followed the instruction from the linkhttp://www.talkingdotnet.com/upgrade-angular-4-app-angular-5-visual-studio-2017/
npm install -g npm-check-updates
ncu -u
The package.json file got updated but the npm are not updated and some of the npm package are not instralled.
Here is the screen shots
From the image the right side package is updated to 5.5.1 but the npm dependency are still pointing to the older version.
How can solve this issue.
I had the very same problem and taking the following steps resolves it:
- Delete npm-shrinkwrap.json file (expand package.json file to see it)
- Delete the node_modules folder in your project folder
Re-install npm:
npm install -g npm-check-updates
这篇关于包更新到 angular 5 最新版本,但 npm 未在 Visual Studio 2017 中使用 angular 模板更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!