-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerbugstate: has PRworkaround2: non-obvious
Milestone
Description
Command
build
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
18
Description
Hi Team,
I just upgraded Angular from v18 to v19 and I have trouble building all of the applications list in the Angular.json.
More specifically, I am getting the following error -
`✘ [ERROR] Cannot read properties of undefined (reading 'kind') [plugin angular-compiler]
node_modules/typescript/lib/typescript.js:30304:14:
30304 │ return node.kind === 243 /* VariableStatement */;
╵ ^
at Object.isVariableStatement (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:30304:15)
at UnusedStandaloneImportsRule.isPotentialSharedReference (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3404:16)
at UnusedStandaloneImportsRule.getUnusedSymbols (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3383:79)
at UnusedStandaloneImportsRule.checkNode (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3359:25)
at walk (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3453:38)
at visitNodes (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:31791:22)
at forEachChildInSourceFile (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:32004:12)
at forEachChild (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:32304:35)
at SourceFileObject.forEachChild (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:148907:12)
at SourceFileValidator.getDiagnosticsForFile (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3451:16)
This error came from the "onStart" callback registered here:
node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js:107:18:
107 │ build.onStart(async () => {
╵ ~~~~~~~
at setup (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js:107:19)
at async handlePlugins (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/esbuild/lib/main.js:1194:20)`
Minimal Reproduction
- use ng update to update working Angular 18 app.
- run ng build id --watch --preserve-symlinks --output-hashing=all
Exception or Error
✘ [ERROR] Cannot read properties of undefined (reading 'kind') [plugin angular-compiler]
node_modules/typescript/lib/typescript.js:30304:14:
30304 │ return node.kind === 243 /* VariableStatement */;
╵ ^
at Object.isVariableStatement (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:30304:15)
at UnusedStandaloneImportsRule.isPotentialSharedReference (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3404:16)
at UnusedStandaloneImportsRule.getUnusedSymbols (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3383:79)
at UnusedStandaloneImportsRule.checkNode (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3359:25)
at walk (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3453:38)
at visitNodes (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:31791:22)
at forEachChildInSourceFile (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:32004:12)
at forEachChild (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:32304:35)
at SourceFileObject.forEachChild (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/typescript/lib/typescript.js:148907:12)
at SourceFileValidator.getDiagnosticsForFile (file:///Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/compiler-cli/bundles/chunk-WLQBAON6.js:3451:16)
This error came from the "onStart" callback registered here:
node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js:107:18:
107 │ build.onStart(async () => {
╵ ~~~~~~~
at setup (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/@angular/build/src/tools/esbuild/angular/compiler-plugin.js:107:19)
at async handlePlugins (/Users/thaoula/projects/workbuddy/jms-platform/jms-web/node_modules/esbuild/lib/main.js:1194:20)
Your Environment
Angular CLI: 19.0.1
Node: 20.18.1
Package Manager: bun 1.1.36
OS: darwin arm64
Angular: 19.0.0
... animations, cdk, cdk-experimental, common, compiler
... compiler-cli, core, forms, localize, platform-browser
... platform-browser-dynamic, platform-server, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1900.1
@angular-devkit/core 19.0.1
@angular-devkit/schematics 19.0.1
@angular/build 19.0.1
@angular/cli 19.0.1
@angular/ssr 19.0.1
@schematics/angular 19.0.1
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else relevant?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerbugstate: has PRworkaround2: non-obvious