最近我为Angular 2的Kendo Grid(@ progress / kendo-angular-grid)从0.7.0升级到0.12.0。我的应用程序在不在AOP时编译正常,但是一旦我尝试在AOT中编译它就失败了。我正在使用Angular 2 CLI命令“ng b --prod --aot”。错误如下。
10%构建模块2/2模块0 active无法解析模块./field-accessor.pipe来自C:/Paylocity/paylocity.reporting/src/paylocity.reporting.web/Paylocity.Reporting.Web.Client/ node_modules/@progress/kendo-angular-grid/dist/es/shared.module.d.ts 无法读取未定义的属性'FieldAccessorPipe',解析C中的符号SharedModule:/Paylocity/paylocity.reporting/src/paylocity.reporting.web/Paylocity.Reporting.Web.Client/node_modules/@progress/kendo-angular-grid/dist /es/shared.module.d.ts,解析C中的符号SharedModule:/Paylocity/paylocity.reporting/src/paylocity.reporting.web/Paylocity.Reporting.Web.Client/node_modules/@progress/kendo-angular-grid /dist/es/shared.module.d.ts 错误:无法读取未定义的属性'FieldAccessorPipe',解析C中的符号SharedModule:/Paylocity/paylocity.reporting/src/paylocity.reporting.web/Paylocity.Reporting.Web.Client/node_modules/@progress/kendo-angular-grid /dist/es/shared.module.d.ts,在C中解析符号SharedModule:/Paylocity/paylocity.reporting/src/paylocity.reporting.web/Paylocity.Reporting.Web.Client/node_modules/@progress/kendo-angular -grid / DIST / ES / shared.module.d.ts 在simplifyInContext(C:\ Users \ chuckj \ src \ angular \ modules \ @angular \ compiler-cli \ src \ static_reflector.ts:537:15) 在StaticReflector.simplify(C:\ Users \ chuckj \ src \ angular \ modules \ @angular \ compiler-cli \ src \ static_reflector.ts:541:20) 在StaticReflector.annotations(C:\ Users \ chuckj \ src \ angular \ modules \ @angular \ compiler-cli \ _src \ static_reflector.ts:93:28) 在NgModuleResolver.resolve(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:14261:46) 在CompileMetadataResolver._loadNgModuleMetadata(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:14646:45) 在CompileMetadataResolver._loadNgModuleSummary(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:14615:33) 在C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:14673:57 at Array.forEach(native) 在CompileMetadataResolver._loadNgModuleMetadata(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:14660:51) at CompileMetadataResolver.getUnloadedNgModuleMetadata(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:14636:23) at addNgModule(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:12944:43) 在C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:12957:16 at Array.forEach(native) at _createNgModules(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:12956:28) at analyzeNgModules(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:12700:16) at analyzeAndValidateNgModules(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:12704:20) 在OfflineCompiler.compileModules(C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:12775:20) 在CodeGenerator.codegen(C:\ Users \ chuckj \ src \ angular \ modules \ @angular \ compiler-cli \ src \ codegen.ts:71:26) 在C:\ Paylocity \ paylocity.reporting \ src \ paylocity.reporting.web \ Paylocity.Reporting.Web.Client \ node_modules \ @ngtools \ webpack \ src \ plugin.js:210:73 at process._tickCallback(internal / process / next_tick.js:103:7)
答案 0 :(得分:0)
您可以尝试最新的@progress/kendo-angular-grid
版本(目前 0.12.1 )。我们针对AoT的构建正在针对 Angular 2.4.x 运行,并且所有构建似乎都在顺利运行。