nivo: RangeError: Maximum call stack size exceeded on build after installing @nivo/radial-bar": "^0.83.0

Hey! I just started to use Nivo 😃 and not sure why, but after installing: @nivo/radial-bar": "^0.83.0" I cannot bundle to prod with vite, getting a tsc error, it didn’t happen when installed
"@nivo/line": "^0.83.0", I also have

        "@nivo/bar": "^0.83.0",
        "@nivo/core": "^0.83.0",
> tsc && cross-env NODE_OPTIONS=--max-old-space-size=8192 P_ENV=production vite build

/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:96888
                throw e;
                ^

RangeError: Maximum call stack size exceeded
    at Object.isPartOfTypeNode (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:11786:30)
    at containsReference (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:52596:53)
    at visitNode (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:24472:24)
    at Object.forEachChild (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:24621:24)
    at containsReference (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:52607:29)
    at visitNode (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:24472:24)
    at Object.forEachChild (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:24657:24)
    at containsReference (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:52607:29)
    at visitNode (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:24472:24)
    at Object.forEachChild (/Users/lironhazan/dev/cloud-apps/services/dashboard/client/node_modules/typescript/lib/tsc.js:24640:24)


using typescript version: ā€œtypescriptā€: ā€œ^4.5.4ā€, npm 8.19.3 + node v16.19.1

Will really appreciate any advice

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 5
  • Comments: 18 (2 by maintainers)

Most upvoted comments

@plouc impressive work on the make file! 😃 I’ve tried to look into the way the lib is built and couldn’t find mention to any active typechecking in the rollup config, I’m not an expert in rollup but maybe using @rollup/plugin-typescript would add the typechecking phase and help tracing such issues?

Thank you 😊 The type checking is done via pkgs-types, and it’s run on CI via:

pkgs-build: pkgs-types ##@1 packages build all packages

Initially @rollup/plugin-typescript didn’t support type checking, that’s why I used another approach.

@LironHazan, I don’t know what could cause that, it would need to be investigated.

Same issue here with compiling with tsc. Works fine with webpack devserver but fails when with tsc. Will need to look to another lib for now…