问题描述
我已在Visual Studio 2017模板中将角度4"更新为角度5".
I have updated the angular 4 to angular 5 in visual studio 2017 template.
我遵循了链接中的指示 http://www.talkingdotnet.com/upgrade-angular-4-app-angular-5-visual-studio-2017/
I followed the instruction from the link http://www.talkingdotnet.com/upgrade-angular-4-app-angular-5-visual-studio-2017/
npm install -g npm-check-updates
npm install -g npm-check-updates
ncu -u
package.json文件已更新,但npm未更新,某些npm软件包未安装.
The package.json file got updated but the npm are not updated and some of the npm package are not instralled.
这是屏幕截图
从该映像中,右侧软件包已更新为5.5.1,但npm依赖项仍指向较早的版本.
From the image the right side package is updated to 5.5.1 but the npm dependency are still pointing to the older version.
如何解决此问题.
推荐答案
我遇到了同样的问题,采取以下步骤可以解决该问题:
I had the very same problem and taking the following steps resolves it:
- 删除 npm-shrinkwrap.json 文件(展开package.json文件以查看它)
- 删除项目文件夹中的 node_modules 文件夹
-
重新安装npm:
- 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模板更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!