我正在尝试将.net Core Angular 4项目从Visual Studio发布到Azure。
我在question周前问了一个类似的问题,并且能够超越它。一切都运行正常,但我最近添加了Kendo控件到我的项目,现在,再一次,我无法发布
在发布期间,我收到以下错误:
Child
Hash: aa44435c6a38edcdbf9a
Time: 11544ms
Asset Size Chunks Chunk Names
main-client.js 268 kB 0 [emitted] [big] main-client
ERROR in Error encountered resolving symbol values statically. Could not resolve @progress/kendo-angular-dateinputs relative to C:/projects/Apps/myApp/DTS.myApp.Web/ClientApp/app/app.module.shared.ts., resolving symbol AppModuleShared in C:/projects/Apps/myApp/DTS.myApp.Web/ClientApp/app/app.module.shared.ts, resolving symbol AppModuleShared in C:/projects/Apps/myApp/DTS.myApp.Web/ClientApp/app/app.module.shared.ts
ERROR in ./ClientApp/boot.browser.ts
Module not found(0,0): Error : Can't resolve './../$$_gendir/ClientApp/app/app.module.browser.ngfactory' in 'C:\projects\DataFinch\myApp\DTS.myApp.Web\ClientApp'
@ ./ClientApp/boot.browser.ts 5:0-95
Child
Hash: c18981f0ab297b0a26e0
Time: 11492ms
Asset Size Chunks Chunk Names
main-server.js 1.8 MB 0 [emitted] [big] main-server
ERROR in Error encountered resolving symbol values statically. Could not resolve @progress/kendo-angular-dateinputs relative to C:/projects/Apps/myApp/DTS.myApp.Web/ClientApp/app/app.module.shared.ts., resolving symbol AppModuleShared in C:/projects/Apps/myApp/DTS.myApp.Web/ClientApp/app/app.module.shared.ts, resolving symbol AppModuleShared in C:/projects/Apps/myApp/DTS.myApp.Web/ClientApp/app/app.module.shared.ts
ERROR in ./ClientApp/boot.server.ts
Module not found(0,0): Error : Can't resolve './../$$_gendir/ClientApp/app/app.module.server.ngfactory' in 'C:\projects\DataFinch\myApp\DTS.myApp.Web\ClientApp'
@ ./ClientApp/boot.server.ts 8:0-94
C:\projects\DataFinch\myApp\DTS.myApp.Web\DTS.myApp.Web.csproj(105,5): Error MSB3073: The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2.
在我的本地机器上一切正常,当env设置为prod时,我似乎无法发布:
这是我的Webpack.js文件。
这是我的package.json文件
答案 0 :(得分:0)
我在webpack配置文件中看到的唯一不同的用于开发和生产的东西是typescript的加载器。因此,您可以尝试使用在生产开发期间使用的相同装载程序吗?这是我的理论,虽然相当早,但在我看来,ngtools并没有解析你新添加的第三方组件,如果它在开发中构建,那么awesome-ts-loader
和{{1可能正在解析它。