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)
- Differences in change detection between components using @for vs *ngFor HOT 1
- NgZoneSchedulingMode not exported HOT 1
- Page Not Found HOT 1
- Functions are missing from localForage after updating Angular to latest version HOT 2
- "updateOn: 'blur'" does not work in formBuilder/formControl HOT 11
- App-shell docs are out-of-date
- https://angular.dev/guide/security not found HOT 2
- Destroy component itself HOT 5
- Image lazy loading doesn't work in SSR when using ngTemplateOutlet and disabled hydration
- @angular/compiler `parseTemplate` fn does not properly parse `HTML` string element text content containing `@` HOT 2
- Angular 17 SSR: Slow server response time when using wildcard route HOT 5
- ERROR LOADING PAGES AFTER USE router.navigate
- SSR fails when root AppComponent in index.html is self-closing HOT 1
- foo = signal(''): if string is empty, !!foo () returns false HOT 1
- Form input mask provided by the framework HOT 6
- [Feature] Introduce Type-safe Token Providing HOT 6
- docs: `inject()` is missing all overloads
- Add distinction between model() and model.required() on type level HOT 1
- Standalone Component Exports HOT 1
- Set ViewEncapsulation per module HOT 2
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.