goto-loop opened a new issue, #23346:
URL: https://github.com/apache/superset/issues/23346

   I'm developing a custom Superset plugin for displaying a graph. The plugin 
works fine when I test it using Storybook and also when I package it and use it 
in a minimal React app. However, as soon as I try to use it with Superset and 
start the frontend using `npm run dev-server`, I get the following error:
   ```
   ERROR in plugins_plugin-graph_src_PluginChartGraph_tsx.483f7114.chunk.js
   Maximum call stack size exceeded
   ```
   When I run `npm run build`, I get this:
   ```
   [webpack-cli] HookWebpackError: Maximum call stack size exceeded
       at makeWebpackError 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack/lib/HookWebpackError.js:48:9)
       at 
/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack/lib/Compilation.js:2517:12
       at eval (eval at create 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10),
 <anonymous>:94:1)
   -- inner error --
   RangeError: Maximum call stack size exceeded
       at String.match (<anonymous>)
       at OriginalSource.streamChunks 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/OriginalSource.js:64:32)
       at module.exports 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
       at ReplaceSource.streamChunks 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/ReplaceSource.js:176:44)
       at module.exports 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
       at streamAndGetSourceAndMap 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/helpers/streamAndGetSourceAndMap.js:27:53)
       at CachedSource.streamChunks 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/CachedSource.js:208:35)
       at module.exports 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
       at ConcatSource.streamChunks 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/ConcatSource.js:112:55)
       at module.exports 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
   caused by plugins in Compilation.hooks.processAssets
   RangeError: Maximum call stack size exceeded
       at String.match (<anonymous>)
       at OriginalSource.streamChunks 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/OriginalSource.js:64:32)
       at module.exports 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
       at ReplaceSource.streamChunks 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/ReplaceSource.js:176:44)
       at module.exports 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
       at streamAndGetSourceAndMap 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/helpers/streamAndGetSourceAndMap.js:27:53)
       at CachedSource.streamChunks 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/CachedSource.js:208:35)
       at module.exports 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
       at ConcatSource.streamChunks 
(/home/goto-loop/Superset/superset-test/superset-frontend/node_modules/webpack-sources/lib/ConcatSource.js:112:55)
   ```
   The output suggests an issue with Webpack, which I also use for bundling my 
plugin (maybe some conflicts there?). On the other hand it seems to be 
connected to one dependency of my plugin: 
[elkjs](https://github.com/kieler/elkjs), which I use for layouting the graph. 
It's basically the Java library [ELK](https://github.com/eclipse/elk) 
transpiled to JS. Without this dependency, Superset loads the plugin with no 
problems.
   
   ### Environment
   
   - browser type and version: Firefox 110.0.1
   - superset version: latest in branch `master`
   - python version: Python 3.9.13
   - node.js version: v16.18.0
   - any feature flags active: None
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   


-- 
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]

Reply via email to