软件包已更新为angular 5最新版本,但npm在Visual Studio 2017中未使用angular模板更新 [英] Package updated to angular 5 latest version but npm not updated in visual studio 2017 using angular template

查看:93
本文介绍了软件包已更新为angular 5最新版本,但npm在Visual Studio 2017中未使用angular模板更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在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:

  1. 删除 npm-shrinkwrap.json 文件(展开package.json文件以查看它)
  2. 删除项目文件夹中的 node_modules 文件夹
  3. 重新安装npm:

  1. Delete npm-shrinkwrap.json file (expand package.json file to see it)
  2. Delete the node_modules folder in your project folder
  3. Re-install npm:

npm install -g npm-check-updates

这篇关于软件包已更新为angular 5最新版本,但npm在Visual Studio 2017中未使用angular模板更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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