相关疑难解决方法(0)

Angular 9:NgModule.imports 中 X 位置的值不是参考

我将 Angular App 从 v8 升级到 v9。该项目使用 Angular 8 和 moment.js 导入自定义 UI 库。

当我构建它时:

  1. 它产生一个警告:
WARNING in Entry point '@myLib/catalogue' contains deep imports into
 '/Users/xyz/Projects/forms-frontend/node_modules/moment/locale/de'.
This is probably not a problem, but may cause the compilation of entry points to be out of order.
Run Code Online (Sandbox Code Playgroud)

@myLib/catalogue.js库文件中(在 node_modules 文件夹中),moment.js DE 语言环境被导入如下:

import 'moment/locale/de';
Run Code Online (Sandbox Code Playgroud)


  1. 也会触发编译错误:
ERROR in Failed to compile entry-point @myLib/catalogue (es2015 as esm2015) due to compilation errors:
node_modules/@myLib/catalogue/fesm2015/catalogue.js:213:26 - error NG1010: Value at position 2 in the NgModule.imports …
Run Code Online (Sandbox Code Playgroud)

deeplink angular angular-cli-v9

11
推荐指数
3
解决办法
3万
查看次数

标签 统计

angular ×1

angular-cli-v9 ×1

deeplink ×1