【发布时间】:2018-01-05 22:32:41
【问题描述】:
我正在使用 Angular CLI 构建一个 Angular 4 应用程序。在部署到产品之前,我想做aot和缩小。所以我执行了以下命令
ng build --environment=prod --prod --base-href /myapp/
这给了我以下错误
ERROR in Error encountered resolving symbol values statically. Calling function 'ControlValueAccessorProviderFactory', function calls are not supported. Consi
der replacing the function or lambda with a reference to an exported function, resolving symbol DatePicker in D:/myapp/node_modules/angular-i
o-datepicker/src/datepicker/datePicker.d.ts, resolving symbol DatePicker in D:/myapp/node_modules/angular-io-datepicker/src/datepicker/datePi
cker.d.ts
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'D:\myapp\src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts
日期选择器模块,它抱怨它是一个外部模块 (https://www.npmjs.com/package/angular-io-datepicker)。
有人可以建议可能出现的问题吗?我该如何解决?
【问题讨论】:
-
它适用于很多人,甚至对我来说也是如此。我的构建过程在 1.2.1 中失败。我恢复到旧版本,它发挥了魔力。这是一个有角度的 github 问题请求。
-
你的意思是 angular-io-datepicker 的 1.2.1 吗?我目前在 angular-io-datepicker 的 1.3.1 上。您最终使用哪个版本解决了问题?
-
没有。我说的是ng-cli。 ext 库在构建期间由它解析
-
让我试试你的文件,看看它是否适合我。
-
@kayasa 你在你的应用程序的任何地方使用
formcontrols
标签: angular angular-cli angular2-aot