AOt编译没有这样的文件或目录

问题描述 投票:0回答:1

我正在尝试 - 我的角度4项目的编译。

我的tsconfig.json文件是

{ "compileOnSave": false, "compilerOptions": { "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": false, "target": "es5", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2017", "dom" ] } }

我正在使用的命令是ng build --aot

我正在使用一个名为bp-datepicker的插件,它在aot编译时出错,尽管它在JIT编译时工作正常。

no such file or directory, open 'pathroproject\project\node_modules\bp-datepicker\bp-datepicker.component.html'

angular-cli版本:“@ angular / cli”:“1.3.1”,

角核版:“@ angular / core”:“^ 4.2.4”,

angular node-modules angular2-aot
1个回答
0
投票

尝试使用--base-href

完整命令:

ng build --base-href /Name_of_Project/ --prod --aot 
© www.soinside.com 2019 - 2024. All rights reserved.