Comments (6)
That error is a TypeScript compiler error, not an Angular error specifically (the fact that it shows up as NG3
is a little surprising...). It's TypeScript complaining that one of the functions in the code is too big/branchy to be analyzed for type narrowing.
Probably the code in question is not one of your own functions, but a component template (which gets translated to a function for type-checking). If a template has too many branches, it can trigger this error.
We'll need a working reproduction to further diagnose the problem and determine if it's due to an excessively large template or perhaps a bug that's causing excessive branching in the type-check block.
from angular.
The component that throws error is around 5000 lines and html template file is over 3000 lines . I don't think i can just copy the file because of dependencies it would fail but i will try to create a component without that dependencies with same error.
When updating to Angular 17 we migrated to new build system via "ng update @angular/cli --name use-application-builder" command. I don't know if error has any connection with this change.
I did a research about error message and found it related to TS2563 typescript error. But i didn't find a way to disable it through tsconfig.json file.
Thanks
from angular.
I created a stackblitz about this error here: link
I noticed in stackblitz i am getting a different error but i think it is related with NG3 error:
✘ [ERROR] Maximum call stack size exceeded [plugin angular-compiler]
This error came from the "onStart" callback registered here:
node_modules/@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js:81:18:
81 │ build.onStart(async () => {
╵ ~~~~~~~
at setup (/home/projects/stackblitz-starters-sl7l8v/node_modules/@angular-devkit/build-angular/src/tools/esbuild/angular/compiler-plugin.js:81:19)
at async handlePlugins (/home/projects/stackblitz-starters-sl7l8v/node_modules/esbuild/lib/main.js:1330:9)
I hope this helps.
from angular.
I have the same problem and don't know why either.. Do you solve it?
from angular.
We would still need a working reproduction of this issue in order to investigate.
from angular.
@alxhub I created a stackblitz here: link
I know stackblitz doesn't have same error but in vscode same code gives ng3 error. If this is not enough let me know what i can provide to you.
Thanks
from angular.
Related Issues (20)
- [i18n] `ng insert-i18n` (reverse `ng extract-i18n`) HOT 3
- generate @angular/core:control-flow failed HOT 1
- It's impossible to set signal input of hosted directive - hostDirectives HOT 1
- `InjectionToken<T>` is poorly typed HOT 1
- Add further documentation about TestBed.override features HOT 1
- @angular/core:control-flow migration breaks with Greek characters
- Cannot read properties of null (reading 'bindingStartIndex') HOT 2
- Issues with types and inheritances of those when used inside FormGroup HOT 2
- feat(@angular/router): Add navigateToParent method with steps option HOT 1
- this.router.getCurrentNavigation().extras.state used to return undefined for the 1st navigation after reload the page HOT 3
- Angular devtools stopped working few days ago. "Angular application not detected" HOT 6
- Using this keyword in templates will use template varibales instead of component variables. HOT 2
- ChangeDetectionSchedulerImpl breaks Zoneless apps
- Minor mistake in "Image optimization" guide page (aio) HOT 2
- Output Signal works, but parent says event is not emitted... HOT 2
- Pipes doc not loading when opening it in angular.dev https://angular.dev/api/common#pipes HOT 1
- Scrolling on angular.dev API reference page is not working well HOT 2
- Angular DevTools not available - Firefox Developer Edition HOT 8
- No link to sources from reference documentation on angular.dev HOT 1
- Uncaught Error: ASSERTION ERROR: NodeInjector must have some connection to the module injector tree HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.