角度4警告:使用相同的套管。比较这些模块标识符

时间:2017-09-21 14:20:36

标签: angular

WARNING in ./node_modules/@angular/Router/@angular/router.es5.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* D:\angular\test2\node_modules\@angular\Router\@angular\router.es5.js
    Used by 1 module(s), i. e.
    D:\angular\test2\node_modules\@ngtools\webpack\src\index.js!D:\angular\test2\src\app\login\login.component.ts
* D:\angular\test2\node_modules\@angular\router\@angular\router.es5.js
    Used by 1 module(s), i. e.
    D:\angular\test2\node_modules\@ngtools\webpack\src\index.js!D:\angular\test2\src\app\app.module.ts

1 个答案:

答案 0 :(得分:0)

由于我不完全清楚的原因,您最终设法安装了@angular/router的两个副本 - 一个在node_modules\@angular\router,另一个在node_modules\@angular\Router。< / p>

这仅适用于某些操作系统,因此警告 - 如果在您实际签入源控件的部分代码中发生类似这样的情况,那么具有区分大小写路径的系统上的人员会遇到试图检查它的问题进行。

要删除警告,请删除node_modules文件夹并再次运行npm install。这将从头开始重新下载您的依赖项。