Loading custom 'Viz' plugin
See original GitHub issueHello,
Recently I have started setting up Apache Superset and to archieve what I am looking for (a custom table view) I want to make a plugin. I have followed this tutorial (maybe 4 times) https://preset.io/blog/2020-07-02-hello-world/
When I follow this tutorial and write npm run dev-server
it will start the dev-server at: http://localhost:9000. It perfectly loads my plugin, but the problem is that I work from home and do everything through Putty on another laptop within the company network. Now, since I work from home I want to test my plugin, how can I archieve to run the dev-server on IP ‘0.0.0.0’?
Normally to run my superset server I write superset run -h 0.0.0.0 -p 8088
this perfectly loads up superset and I can access it at home but this does not load the hello-world plugin!
What I already tried
- I created a new plugin from scratch following the same steps
- I tried running
npm run dev-server --host 0.0.0.0
So I see two possibilities:
- Can I load my plugin when running
superset run -h 0.0.0.0 -p 8088
- Can I access the dev server from home?
Issue Analytics
- State:
- Created 3 years ago
- Comments:24 (9 by maintainers)
Top GitHub Comments
Hello @returnzer0 I reach a solution with docker. I’m using a old plugin (JS instead of TS) but I think it should work.
"@superset-ui/legacy-plugin-chart-mychart": "file:superset-ui/plugins/legacy-plugin-chart-mychart"
COPY ./superset-frontend/superset-ui /app/superset-frontend/superset-ui
This command should be before this other command.The steps from 1-8 should be repeated when you add a new plugin, but if you are doing some changes in your plugin you can change the files in the plugin and the changes will be reflected in your instance when you restart it.
I hope this works for you. I know how frustating is it, I spend 2 whole weeks to understand it.
Not sure I fully understood the problem, but I’d recommend try not to rely on Docker for the dev build.
You may even try to start Superset with Docker, but checkout another copy of superset source code to have a clean build.
The webpack dev server allows you to point to arbitrary remote host (even if it is running on a different version of Superset), so as long as you have the backend successfully running somewhere, you can always build the dev server locally to get more predictable build results.