dosubot[bot] commented on issue #37166: URL: https://github.com/apache/superset/issues/37166#issuecomment-3754923466
<!-- Answer --> Your build errors are happening because Superset 6.0.0 does not include the `@apache-superset/core` modulesāthese are not present or mapped in the codebase or TypeScript config, so imports like `@apache-superset/core`, `@apache-superset/core/ui`, and `@apache-superset/core/api/core` will always fail with TS2307 errors. You should update your overridden files to use only valid imports from packages like `@superset-ui/core` or other modules that exist in this version. Check the original files in the repo for the correct import paths and update your overrides to match them [source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/tsconfig.json#L3-L20). The TS2353 error about `'formatter' does not exist in type 'LabelOption'` is likely a side effect of the module resolution issues above. In ECharts 5.x (which Superset 6.0.0 uses), `LabelOption` should support a `formatter` property, so once your imports are fixed and dependencies are installed cleanly, this error should go away [source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/package.json#L133-L133). Also, your environment is out of date for Superset 6.0.0+ builds: you need Node 20.x and Python 3.10/3.11. Using Node 16 and Python 3.9 will cause build failures and TypeScript errors. Upgrade your environment, clean out `node_modules` and Docker volumes, and rebuild [source](https://github.com/apache/superset/issues/37129). After correcting your imports and environment, run `npm run plugins:build` in the `superset-frontend` directory to ensure all type declarations are generated and available [source](https://github.com/apache/superset/pull/35915). When customizing frontend plugins, always make sure your overrides are compatible with the current Superset version and its dependencies. If you still see errors after these changes, double-check that your custom files match the structure and imports of the latest source. <!-- 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/ebeb81b3-3985-44f8-9c99-cf36fc0f484a?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ebeb81b3-3985-44f8-9c99-cf36fc0f484a?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ebeb81b3-3985-44f8-9c99-cf36fc0f484a?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ebeb81b3-3985-44f8-9c99-cf36fc0f484a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ebeb81b3-3985-44f8-9c99-cf36fc0f484a?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/ebeb81b3-3985-44f8-9c99-cf36fc0f484a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ebeb81b3-3985-44f8-9c99-cf36fc0f484a?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Your%20build%20errors%20are%20happening%20because%20Superset%206.0.0%20does%20not%20include%20the%20%60%40apache-superset/core%60%20modules%E2%80%94these%20are%20not%20present%20or%20mapped%20in%20the%20codebase%20or%20TypeScript%20config%2C%20so%20imports%20like%20%60%40apache-superset/core%60%2C%20%60%40apache-superset/core/ui%60%2C%20and%20%60%40apache-superset/core/api/core%60%20will%20always%20fail%20with%20TS2307%20errors.%20You%20should%20update%20your%20overridden%20files%20to%20use%20only%20valid%20imports%20from%20packages%20like%20%60%40superset-ui/core%60%20or%20other%20modules%20that%20exist%20in%20this%20version.%20Check%20the%20original%20files%20in%20the%20repo%20for%20the%20correct%20import%20paths%20and%20update%20your%20overrides %20to%20match%20them%20%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/tsconfig.json%23L3-L20%29.%0A%0AThe%20TS2353%20error%20about%20%60%27formatter%27%20does%20not%20exist%20in%20type%20%27LabelOption%27%60%20is%20likely%20a%20side%20effect%20of%20the%20module%20resolution%20issues%20above.%20In%20ECharts%205.x%20%28which%20Superset%206.0.0%20uses%29%2C%20%60LabelOption%60%20should%20support%20a%20%60formatter%60%20property%2C%20so%20once%20your%20imports%20are%20fixed%20and%20dependencies%20are%20installed%20cleanly%2C%20this%20error%20should%20go%20away%20%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/package.json%23L133-L133%29.%0A%0AAlso%2C%20your%20environment%20is%20out%20of%20date%20for%20Superset%206.0.0%2B%20builds%3A%20you%20need%20Node%2020.x%20and%20Python%203.10/3.11.%20Using%20Node%2016%20and%20Python%203.9%20will%20cause%20build%20 failures%20and%20TypeScript%20errors.%20Upgrade%20your%20environment%2C%20clean%20out%20%60node_modules%60%20and%20Docker%20volumes%2C%20and%20rebuild%20%5Bsource%5D%28https%3A//github.com/apache/superset/issues/37129%29.%0A%0AAfter%20correcting%20your%20imports%20and%20environment%2C%20run%20%60npm%20run%20plugins%3Abuild%60%20in%20the%20%60superset-frontend%60%20directory%20to%20ensure%20all%20type%20declarations%20are%20generated%20and%20available%20%5Bsource%5D%28https%3A//github.com/apache/superset/pull/35915%29.%0A%0AWhen%20customizing%20frontend%20plugins%2C%20always%20make%20sure%20your%20overrides%20are%20compatible%20with%20the%20current%20Superset%20version%20and%20its%20dependencies.%20If%20you%20still%20see%20errors%20after%20these%20changes%2C%20double-check%20that%20your%20custom%20files%20match%20the%20structure%20and%20imports%20of%20the%20latest%20source.) [](https://g o.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37166) -- 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]
