dosubot[bot] commented on issue #34730:
URL: https://github.com/apache/superset/issues/34730#issuecomment-3195594675

   <!-- Greeting -->
   Hi @chlonn! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.
   
   <!-- Answer -->
   This error is happening because d3-scale v4 switched to ES modules by adding 
`"type": "module"` in its package, which can break builds expecting CommonJS 
modules and result in `ReferenceError: module is not defined` at runtime if 
your build tooling isn't configured for ESM compatibility. The upgrade to 
d3-scale@4 was made very recently in Superset's @superset-ui/core dependency 
([PR #31534](https://github.com/apache/superset/pull/31534)), and there isn't 
any documented workaround or code-level fix for this issue in the repo yet.
   
   To work around this, you can try pinning d3-scale to v3 in your 
dependencies, or update your build configuration (webpack, Babel, etc.) to 
fully support ESM packages. If you need to revert, set d3-scale to `^3.3.0` in 
your package.json and run a clean install. If you want to use v4, make sure 
your build tools are set up for ESM imports throughout your frontend stack.
   
   Let me know if you need help with specific build config changes or 
troubleshooting the pinning process.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/366f2c76-7a85-4602-89e7-95ee8d5c65c7?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/366f2c76-7a85-4602-89e7-95ee8d5c65c7?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/366f2c76-7a85-4602-89e7-95ee8d5c65c7?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/366f2c76-7a85-4602-89e7-95ee8d5c65c7?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/366f2c76-7a85-4602-89e7-95ee8d5c65c7?feedback_type=hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/366f2c76-7a85-4602-89e7-95ee8d5c65c7?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/366f2c76-7a85-4602-89e7-95ee8d5c65c7?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34730)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to