[Angular 9.0.4] Building throws `ERROR in Error when flattening the source-map "[...].d.ts.map" for "[...].d.ts": Maximum call stack size exceeded`
See original GitHub issue🐞 bug report
Affected Package
Probably @angular/cli
, but I was asked to open the issue here.
Is this a regression?
Yes. The issue does not occur with Angular 9.0.2. Version 9.0.3 causes a different RangeError: Maximum call stack size exceeded
error, tracked here: https://github.com/angular/angular-cli/issues/17106.
Description
Building and serving both fail consistently with a bunch of the following messages:
ERROR in Error when flattening the source-map "[/path/to/file1].d.ts.map" for "[/path/to/file1].d.ts": RangeError: Maximum call stack size exceeded
ERROR in Error when flattening the source-map "[/path/to/file2].d.ts.map" for "[/path/to/file2].d.ts": RangeError: Maximum call stack size exceeded
...
ERROR in Error when flattening the source-map "[/path/to/fileN].d.ts.map" for "[/path/to/fileN].d.ts": RangeError: Maximum call stack size exceeded
The issue seems similar to the above mentioned one and deleting node_modules
does not fix it.
My setup is an Angular workspace with two projects: an app and a lib. The source-maps being “flattened” when the error occurs belong to the lib. The error occurs when attempting to build (--prod
or otherwise) or serve the app.
🌍 Your Environment
Angular Version:
Angular CLI: 9.0.4
Node: 13.9.0
OS: linux x64
Angular: 9.0.4
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.900.4
@angular-devkit/build-angular 0.900.4
@angular-devkit/build-ng-packagr 0.900.4
@angular-devkit/build-optimizer 0.900.4
@angular-devkit/build-webpack 0.900.4
@angular-devkit/core 9.0.4
@angular-devkit/schematics 9.0.4
@angular/cdk 9.1.0
@ngtools/webpack 9.0.4
@schematics/angular 9.0.4
@schematics/update 0.900.4
ng-packagr 9.0.2
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:35 (7 by maintainers)
Top Results From Across the Web
angular error module build failed.-Error: Maximum call stack ...
compiler.png. I am creating a build in angular routing module and I have added all modules according to the directory structure but I...
Read more >A brand new website interface for an even better experience!
[Angular 9.0.4] Building throws `ERROR in Error when flattening the source-map "[...].d.ts.map" for "[...].d.ts": Maximum call stack size exceeded`
Read more >TypeScript configuration - Angular
The Angular CLI generates a tsconfig.app.json file which is used to build an application, in which the types compiler option is set to...
Read more >Maximum call stack size exceeded - Netlify Support Forums
PLEASE help us help you by writing a good post! we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app DNS ...
Read more >maximum call stack size exceeded typescript - You.com
After installing typescript 3.2.1 I'm getting this error: D:\git\workbench-ts ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was getting this after an upgrade from 9.0.2 -> 9.0.4. Deleting
node_modules
didn’t fix it, but deleting bothnode_modules
anddist
folders thennpm ci
and rebuild/re-serve did the trick.I’ve got a slightly odd layout, a framework workspace and a separate application workspace that uses
tsconfig.json
paths to reference the framework packages out of their built dist folders.with angular 9, there is a incremental build process which is in the /dist folder.