包更新到 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

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

问题描述

我已将 Visual Studio 2017 模板中的 angular 4 更新为 angular 5.

我按照链接中的说明进行操作

从图中右侧包更新到 5.5.1,但 npm 依赖项仍然指向旧版本.

如何解决这个问题.

解决方案

我遇到了同样的问题,并采取以下步骤解决了它:

  1. 删除npm-shrinkwrap.json文件(展开package.json文件查看)
  2. 删除项目文件夹中的 node_modules 文件夹
  3. 重新安装 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 link http://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:

  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天全站免登陆