我尝试将 Angular 8 应用程序升级到 Angular 9,但在 Ubuntu/Debian 下遇到构建错误(Windows 工作正常):
我正在构建一个带有生产标志 ( ng run app:server --configuration=production
) 的 SSR 包。这是来自 Gitlab-CI 的构建日志的相关部分。
Compiling @angular/flex-layout/core : main as umd
Compiling @angular/flex-layout/server : main as umd
Compiling @angular/flex-layout/extended : main as umd
Compiling @angular/flex-layout/flex : main as umd
Compiling @angular/flex-layout/grid : main as umd
Compiling @angular/flex-layout : main as umd
Hash: ebebbb435a85a9bde859
Time: 304615ms
Built at: 03/02/2020 1:33:20 PM
Asset Size Chunks Chunk Names
main.js 1.76 KiB 0 main
Entrypoint main = main.js
chunk {0} main.js (main) 28 bytes [entry] [rendered]
ERROR in Tried to overwrite /builds/<path>/node_modules/@angular/flex-layout/core/typings/module.d.ts.__ivy_ngcc_bak with an ngcc back up file, which is disallowed.
我猜怎么回事是 Ivy 没有得到核心模块已经编译然后在@angular/flex-layout
已清除所有缓存。它似乎只适用于 Windows。其他装有 Ubuntu 或 Debian 的计算机都会在同一个地方出现故障。
有人对 Angular 9 和 Ivy 有过类似的问题吗?