小编Ann*_*nna的帖子

AppModule 的 NgModule.imports 中位置 5 的值不是引用(构建错误 Angular2)

我将 Angular 从 8 更新到 9,当我尝试构建项目时出现此错误:

ERROR in src/app/app.module.ts:43:12 - error NG1010: Value at position 5 in the NgModule.imports of AppModule is not a reference: [object Object]

 43   imports: [
               ~
 44     BrowserModule,
    ~~~~~~~~~~~~~~~~~~
...
 62     CoreModule.forRoot(),
    ~~~~~~~~~~~~~~~~~~~~~~~~~
 63   ],
    ~~~
src/app/app.component.ts:14:14 - error NG8001: 'router-outlet' is not a known element:
1. If 'router-outlet' is an Angular component, then verify that it is part of this module.
2. If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' …
Run Code Online (Sandbox Code Playgroud)

build updates angular

2
推荐指数
1
解决办法
9624
查看次数

标签 统计

angular ×1

build ×1

updates ×1