在Stackblitz中使用esbuild构建器运行Angular应用失败求助
Angular esbuild构建器在Stackblitz环境下运行报错
在Stackblitz中使用esbuild构建器启动Angular应用时,遇到以下两个错误:
⠴ Building...✘ [ERROR] Unable to deserialize cloned data. [plugin angular-compiler] This error came from the "onStart" callback registered here: node_modules/@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js:89:18: 89 │ build.onStart(async () => { ╵ ~~~~~~~ at setup (/home/projects/etn2qr-fcdsqt/node_modules/@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js:89:19) at async handlePlugins (/home/projects/etn2qr-fcdsqt/node_modules/esbuild/lib/main.js:1330:9) ✘ [ERROR] File 'src/main.ts' is missing from the TypeScript compilation. [plugin angular-compiler] Ensure the file is part of the TypeScript program via the 'files' or 'include' property.
补充信息:
src/main.ts已在tsconfig.app.json中通过files或include字段配置,属于TypeScript编译范围- 将项目代码下载到本地环境后,使用相同的esbuild构建器可正常运行,推测该问题仅出现在Stackblitz环境中
内容的提问来源于stack exchange,提问作者Krishna
相关产品推荐
相关产品推荐

