Custom builders using @angular-devkit/build-angular cannot resolve downstream packages when compiled using tsc #27902
Labels
area: @angular/build
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Command
other
Is this a regression?
The previous version in which this bug was not present was
17.3
Description
We have a custom builder for our angular project that has worked smoothly since Angular 8. We recently upgraded from Angular 15 to Angular 18 and tsc now throws errors when attempting to compile the builder. The errors thrown suggest changing the "moduleResolution" setting in tsconfig.builders.json, but each setting results in different downstream module resolution problems in the @angular-devkit/build-angular package.
Example error:
The full set of errors is pasted below.
I've attempted to change tsconfig.builders.json to use
But each of these yields a different set of errors.
Minimal Reproduction
Minimal reproduction repository: https://github.com/bowles-tyler-b/Angular8-failed-tsc-builder
After running "npm install", run the command "npm run compile" to reproduce the errors
Exception or Error
Your Environment
Anything else relevant?
Adding skipLibCheck to the ts compiler options will suppress the error; this is a workaround now, but reduces type safety in the custom builder.
The text was updated successfully, but these errors were encountered: