Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found Error Building custom viz plugins in superset #18912

Closed
3 tasks
pm20202 opened this issue Feb 24, 2022 · 4 comments · Fixed by #18914
Closed
3 tasks

Module not found Error Building custom viz plugins in superset #18912

pm20202 opened this issue Feb 24, 2022 · 4 comments · Fixed by #18914
Labels
#bug Bug report doc:developer Developer documentation doc Namespace | Anything related to documentation

Comments

@pm20202
Copy link

pm20202 commented Feb 24, 2022

A clear and concise description of what the bug is.
I am trying to install Superset for building custom visualization using the guide at: https://superset.apache.org/docs/installation/building-custom-viz-plugins/

Please note that I am attempting it on Ubuntu 20.04 VMs behind a proxy. And I am running superset on http://localhost:9000/(in dev mode)

However, for tinkering with custom visualizations, I need to go https://superset.apache.org/docs/installation/building-custom-viz-plugins/#add-your-plugin-to-superset-with-npm-link. After following all the steps successfully when I run it on 9000 port
I got this error. "Module not found: Error: Can't resolve '@superset-ui/plugin-chart-hello-world' in '/home/rrscw/superset/superset-frontend/src/visualizations/presets''

How to reproduce the bug

Expected results

hello world chart plugin visible in superset on port 9000 in dev mode.

Actual results

https://superset.apache.org/docs/installation/building-custom-viz-plugins/#add-your-plugin-to-superset-with-npm-link
After adding package in package.json using above link and successfully doing changes in MainPreset.js file I got this error:

ERROR in ./src/visualizations/presets/MainPreset.js 40:0-74
Module not found: Error: Can't resolve '@superset-ui/plugin-chart-hello-world' in '/home/rrscw/superset/superset-frontend/src/visualizations/presets'

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

(please complete the following information):

OS: Ubuntu Server 20.04
Python on VM: 3.8.10

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@pm20202 pm20202 added the #bug Bug report label Feb 24, 2022
@villebro
Copy link
Member

@pm20202 thanks for reporting - it appears this documentation is the old one. Let me see if the documentation has been reverted at some point.

@villebro villebro added doc Namespace | Anything related to documentation doc:developer Developer documentation labels Feb 24, 2022
@villebro
Copy link
Member

This is the correct page: https://superset.apache.org/docs/contributing/creating-viz-plugins . I'll make sure the old one gets removed. Please also check out a blog post + an example plugin I wrote for the article: https://preset.io/blog/building-custom-viz-plugins-in-superset-v2/

@pm20202
Copy link
Author

pm20202 commented Feb 24, 2022

Thanks ! It worked for me

@victorfonseca
Copy link

This is not working anymore, also when I build the plugin and follow the steps Apache Superset is not able to find the plugin on docker-compose option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report doc:developer Developer documentation doc Namespace | Anything related to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants