You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "jpchev (via GitHub)" <gi...@apache.org> on 2025/02/28 19:19:42 UTC
[I] Module not found when writing creating Visualization Plugins [superset]
jpchev opened a new issue, #32433:
URL: https://github.com/apache/superset/issues/32433
### Bug description
i've gone through the documentation to create a custom plugin
https://superset.apache.org/docs/contributing/howtos/#creating-visualization-plugins
but I get the following error
`Module not found: Error: Can't resolve 'superset-plugin-chart-hello-world' in '/app/superset-frontend/src/visualizations/presets'`
after this command
`npm i -S /tmp/superset-plugin-chart-hello-world`
btw, this command
`yo @superset-ui/superset`
gives the following error
```
Running npm install for you to install the required dependencies.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: superset-plugin-chart-hello-world@0.1.0
npm ERR! Found: react@16.14.0
npm ERR! node_modules/react
npm ERR! peer react@"^17.0.2" from the root project
npm ERR! peer react@">=16.0.0" from @ant-design/icons@4.7.0
npm ERR! node_modules/@ant-design/icons
npm ERR! @ant-design/icons@"^4.7.0" from antd@4.18.3
npm ERR! node_modules/antd
npm ERR! peer antd@"^4.9.4" from @superset-ui/chart-controls@0.18.25
npm ERR! node_modules/@superset-ui/chart-controls
npm ERR! peer @superset-ui/chart-controls@"*" from the root project
npm ERR! 47 more (@ant-design/react-slick, @emotion/react, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@17.0.2
npm ERR! node_modules/react
npm ERR! peer react@"^17.0.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
```
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
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: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Module not found when creating Visualization Plugins [superset]
Posted by "jpchev (via GitHub)" <gi...@apache.org>.
jpchev commented on issue #32433:
URL: https://github.com/apache/superset/issues/32433#issuecomment-2938936907
ok, I'll close this issue
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Module not found when creating Visualization Plugins [superset]
Posted by "jpchev (via GitHub)" <gi...@apache.org>.
jpchev commented on issue #32433:
URL: https://github.com/apache/superset/issues/32433#issuecomment-2691406631
@villebro could you please put me on the right direction?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Module not found when creating Visualization Plugins [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32433:
URL: https://github.com/apache/superset/issues/32433#issuecomment-2938168481
Not sure if we should still keep this open... there are likely still issues with the aging build tools, and the new ones aren't ready yet. We'd welcome improvements here, but this isn't getting much active maintenance otherwise at the moment.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Module not found when creating Visualization Plugins [superset]
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on issue #32433:
URL: https://github.com/apache/superset/issues/32433#issuecomment-2691448240
@jpchev we're currently hard at work to improve the extension architecture (see #31932), as the current plugin system has multiple issues. I would almost advise against creating new visualization plugins until the new framework has been rolled out. But if you do want to work with the existing system, I recommend using 4.1.1 as the base, as that should have React 16 which is required by the plugin peer dependencies.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Module not found when creating Visualization Plugins [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #32433:
URL: https://github.com/apache/superset/issues/32433#issuecomment-2691388098
<!-- Answer -->
I found a similar closed issue that might be relevant to your problem: [Module not found Error Building custom viz plugins in superset](https://github.com/apache/superset/issues/18912). This issue was closed by a pull request that removed old visualization plugin documentation, which might indicate that the documentation you followed could be outdated <sup>[[1]](https://github.com/apache/superset/issues/18912)</sup>.
To address the React version conflict you're encountering, you can try the following steps:
1. **Align React Versions**: Ensure that your project's React version matches the peer dependencies required by Superset's visualization plugins. According to the peer dependencies, React should be version `^17.0.2` <sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-demo/package.json)</sup>.
2. **Use `--legacy-peer-deps`**: When running `npm install`, use the `--legacy-peer-deps` flag to bypass peer dependency conflicts:
```bash
npm install --legacy-peer-deps
```
3. **Check `package.json`**: Verify that your `package.json` in both the Superset project and your plugin project specifies compatible versions of React and other dependencies.
4. **Reinstall Dependencies**: After making changes to your `package.json`, remove `node_modules` and `package-lock.json`, then reinstall dependencies:
```bash
rm -rf node_modules package-lock.json
npm install --legacy-peer-deps
```
These steps should help resolve the dependency conflicts and allow you to proceed with creating and importing your custom visualization plugin.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/828dc2e9-36df-4938-9fef-3ec58b4b110e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/828dc2e9-36df-4938-9fef-3ec58b4b110e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/828dc2e9-36df-4938-9fef-3ec58b4b110e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/828dc2e9-36df-4938-9fef-3ec58b4b110e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/828dc2e9-36df-4938-9fef-3ec58b4b110e?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/828dc2e9-36df-4938-9fef-3ec58b4b110e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/828dc2e9-36df-4938-9fef-3ec58b4b110e?feedback_type=other)</sup>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Module not found when creating Visualization Plugins [superset]
Posted by "jpchev (via GitHub)" <gi...@apache.org>.
jpchev closed issue #32433: Module not found when creating Visualization Plugins
URL: https://github.com/apache/superset/issues/32433
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org