【问题标题】:AOt Compilation no such file or directoryAOt 编译没有这样的文件或目录
【发布时间】:2019-03-28 06:52:01
【问题描述】:

我正在尝试对我的 Angular 4 项目进行 --aot 编译。

我的 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】:

    尝试使用--base-href

    完整的命令:

    ng build --base-href /Name_of_Project/ --prod --aot 
    

    【讨论】:

    • 不行,你能不能在你这边试一次
    猜你喜欢
    • 1970-01-01
    • 2015-10-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-04
    • 2016-05-21
    • 2012-04-24
    • 2016-03-04
    相关资源
    最近更新 更多