I’m using gitlab to build a Docker image from an Angular application. This always worked fine but for some reason the build breaks since yesterday during
RUN node_modules/.bin/ng build --configuration=staging
with the following error message:
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 … haven’t been changed for quite a while now so I’m clueless why this is suddenly no longer working. Any hints appreciated!
Source: Dockerfile Questions