ngx-charts: Error: Error on worker #1: RangeError: Maximum call stack size exceeded

Describe the bug After adding @angular/cdk 11.2.13 and ngx-charts to the project npm install does not work anymore.

To Reproduce Steps to reproduce the behavior:

  1. npm install --save @angular/cdk@11.2.13
  2. npm install --save @swimlane/ngx-charts@18.0.1
  3. npm install
  4. See error
Compiling @swimlane/ngx-charts : es2015 as esm2015
Compiling @swimlane/ngx-charts : main as umd
Error: Error on worker #1: RangeError: Maximum call stack size exceeded
    at resolveNameHelper (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/typescript/lib/typescript.js:44875:35)
    at resolveName (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/typescript/lib/typescript.js:44873:20)
    at resolveEntityName (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/typescript/lib/typescript.js:46147:42)
    at getSymbolOfNameOrPropertyAccessExpression (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/typescript/lib/typescript.js:77578:28)
    at getSymbolAtLocation (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/typescript/lib/typescript.js:77647:28)
    at Object.getSymbolAtLocation (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/typescript/lib/typescript.js:43738:31)
    at UmdReflectionHost.findUmdImportParameter (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:341:45)
    at UmdReflectionHost.getImportPathFromParameter (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:424:40)
    at UmdReflectionHost.getUmdModuleDeclaration (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:412:35)
    at UmdReflectionHost.getDeclarationOfIdentifier (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:54:70)
    at ClusterMaster.onWorkerMessage (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:195:27)
    at /home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:55:95
    at ClusterMaster.<anonymous> (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:293:57)
    at step (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/tslib/tslib.js:143:27)
    at Object.next (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/tslib/tslib.js:124:57)
    at /home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/tslib/tslib.js:113:16)
    at EventEmitter.<anonymous> (/home/hgsch/sourcecode/beratungsrechner-frontends/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:287:32)
    at EventEmitter.emit (events.js:376:20)

Additional Information I found a similar bug report for another @swimlane project (@swimlane/ngx-datatable), probably both are related to each other: https://github.com/swimlane/ngx-datatable/issues/1676

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 10
  • Comments: 16 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks @neffsvg - saved me some time testing…

This is now really annoying because we can’t upgrade our Angular version until this issue is fixed. Something must have changed in the package build process to cause this. Does anyone know what specifically is missing in the npm package that causes it to break?

Cheers

issue still present after upgrading to version 19.0.0

added ngcc.config.js to root folder (as mentioned earlier) to “solve” the issue, containing:

module.exports = {
	packages: {
		'@swimlane/ngx-charts': {
			entryPoints: {
				'.': { override: { main: undefined } },
			},
		},
	},
};

Same problem here. The only thing that worked for me was to create a ngcc.config.js file as suggested by d-rybachuk in issue #1623. I hope they release a fix for this soon.