我正在尝试在我当前的项目中启用 angularivy,而 ng build 我得到了这个错误。
ERROR in src\app\app.module.ts(172,19): Error during template compile of 'AppModule'
Function expressions are not supported in decorators
Consider changing the function expression into an exported function.
src/app/home/home.component.ts(95,4): error TS2554: Expected 2 arguments, but got 1.
src/app/home/home.component.ts(96,4): error TS2554: Expected 2 arguments, but got 1.
node_modules/ngx-bootstrap/timepicker/models/index.d.ts(3,22): error TS2307: Cannot find module '@angular/core/src/type'.
src/app/nomina/solicitudes/vacaciones/vacaciones.component.ts(56,4): error TS2554: Expected 2 arguments, but got 1.
我已经检查了一些建议,例如在导出中创建函数并再次使用它,但错误发生了变化而不是被解决。
],
exports: [],
entryComponents: [],
providers: [
AuthGuard,
{ provide: LOCALE_ID, useValue: 'es' },
CommonService,
{
provide: NgbDateParserFormatter,
useFactory: () => new CustomNgbDateParserFormatter('longDate')
},
如果错误解决,它可能会成功构建