You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Does anyone have any one have any suggestions to try and track down this issue.
This issue is obviously not happening to everyone.
Our project has multiple apps in a single angular.json file.
All apps except 1 cannot build due to this error. However 1 of them does build. The codebase is quite large and I am not sure where to look in order to isolate the issue.
I have tried again with the latest angular and the problem still exists.
It looks liks the issue orginiates from the new unused standalone import diagnostics.
Until this is resolved, you can workaround an disable the diagnostic in your tsconfig with :
Activity
thaoula commentedon Nov 28, 2024
Hi Team,
Does anyone have any one have any suggestions to try and track down this issue.
This issue is obviously not happening to everyone.
Our project has multiple apps in a single angular.json file.
All apps except 1 cannot build due to this error. However 1 of them does build. The codebase is quite large and I am not sure where to look in order to isolate the issue.
I have tried again with the latest angular and the problem still exists.
Kind regards,
Tarek
JeanMeche commentedon Nov 28, 2024
It looks liks the issue orginiates from the new unused standalone import diagnostics.
Until this is resolved, you can workaround an disable the diagnostic in your
tsconfigwith :thaoula commentedon Nov 28, 2024
Hi @JeanMeche,
Many thanks for the tip. I have add the above to the tsconfig and I can now build all the projects.
Kind Regards,
Tarek
fix(compiler-cli): error in unused standalone imports diagnostic (#59064
fix(compiler-cli): error in unused standalone imports diagnostic (ang…
angular-automatic-lock-bot commentedon Jan 6, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(compiler-cli): error in unused standalone imports diagnostic (ang…