qleroy commented on PR #27456:
URL: https://github.com/apache/superset/pull/27456#issuecomment-2001917107

   I think it is not quite right and the correct solution is to install yo@4 
installed of the latest version.
   
   The command
   
   ```bash
   npm i -g yo
   ```
   
   installs version 5.0 of the CLI tool [yo](https://www.npmjs.com/package/yo).
   
   If you try to scaffold a plugin with this version you get the error:
   
   ```bash
   yo @superset-ui/superset
   
   Error @superset-ui/superset Current environment doesn't provide some 
necessary feature this generator needs.
   ```
   
   And i did not find any way to investigate these lacking "necessary feature".
   
   Reverting to previous version solves the error:
   
   ```bash
   npm i -g yo@4
   yo @superset-ui/superset
   
   # you get the prompts to create the boilerplate code
   ```
   
   If you install the [@superset-ui/superset-generator on 
npmjs.com](https://www.npmjs.com/package/@superset-ui/generator-superset) 
you'll run into errors eventually.
   
   [The blog 
post](https://preset.io/blog/building-custom-viz-plugins-in-superset-v2/) says :
   
   > It is recommended to use the version of the template that ships with the 
version of Superset you are using. This can be installed by doing the following
   
   Issue #27496 is most relevant here. 
   https://www.npmjs.com/package/@superset-ui/core and 
https://www.npmjs.com/package/@superset-ui/chart-controls are out of sync with 
master on Github.
   To use the most recent capabilities the workaround is to use 
   
   ```json
   "@superset-ui/chart-controls": 
"file:/home/qleroy/superset/superset-frontend/packages/superset-ui-chart-controls",
   "@superset-ui/core": 
"file:/home/qleroy/superset/superset-frontend/packages/superset-ui-core",
   ```
   but using local files for a custom plugin will prevent it from publishing it 
to npm


-- 
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-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to