首页 > 解决方案 > 使用“npm”恢复依赖关系。在 Visual Studio 2019 中这可能需要几分钟

问题描述

我在visual studio 2019中使用了一个带有角度模板的默认asp.net核心,我构建了它,然后显示了这个输出,现在我不明白

1>Restoring dependencies using 'npm'. This may take several minutes... 1>npm WARN deprecated @angular/http@6.1.10: Switch to @angular/common/http - see https://angular.io/guide/http 1>npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead: 1>npm WARN deprecated npm i nyc 1>npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.

我无法构建我的项目并退出 Visual Studio,

标签: angularasp.net-corevisual-studio-2019

解决方案


如果它卡在 Visual Studio 中,请尝试将其关闭。之后进入ClientApp文件夹并删除node_modules以避免一些卡在包中。之后npm installClientApp. 这样,您将能够在命令运行时在控制台上看到是否有一些进展。

npm install将需要几分钟,具体取决于您的 PC 性能和网络连接。


推荐阅读