我正在使用 gitlab 从 Angular 应用程序构建 Docker 映像。这总是工作得很好,但由于某种原因,从昨天开始构建中断
RUN node_modules/.bin/ng build --configuration=staging
带有以下错误消息:
Compiling @angular/material/grid-list : es2015 as esm2015
(node:1) UnhandledPromiseRejectionWarning: TypeError: angularCompiler.getDiagnosticsForFile is not a function
at /opt/ng/node_modules/@ngtools/webpack/src/ivy/plugin.js:390:60
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✔ Browser application bundle generation complete.
Warning: /opt/ng/src/environments/environment.test.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
./src/main.ts - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: Cannot find module '@angular/compiler-cli/linker'
tsconfig, main.ts, package.json, Dockerfile ...已经有一段时间没有更改了,所以我不知道为什么这突然不再起作用了。任何提示表示赞赏!