Pluggable widget - circular dependencies

1
I am building a widget using the deck.gl library (https://www.npmjs.com/package/deck.gl). When trying to compile the widget I get an error about circular dependencies (see below).  Those circular dependencies don’t seem to be a problem when using the same library in a create-react-app with webpack, but apparently rollup doesn’t know how to handle them. As a result the widget is not rendered on the page. Does anybody know how I could get around this? In another post, somebody recommended to change the version of the pluggable widget tool to 8.13.3 for instance, but I am not sure where I can change this. (https://community.mendix.com/link/questions/110802) Thank you, ------ Error: Circular dependency: node_modules\@luma.gl\gltools\dist\esm\state-tracker\unified-parameter-api.js -> node_modules\@luma.gl\gltools\dist\esm\state-tracker\track-context-state.js -> node_modules\@luma.gl\gltools\dist\esm\state-tracker\unified-parameter-api.js Error: Circular dependency: node_modules\@luma.gl\webgl\dist\esm\classes\framebuffer.js -> node_modules\@luma.gl\webgl\dist\esm\classes\copy-and-blit.js -> node_modules\@luma.gl\webgl\dist\esm\classes\framebuffer.js Error: Circular dependency: node_modules\@luma.gl\webgl\dist\esm\webgl-utils\texture-utils.js -> node_modules\@luma.gl\webgl\dist\esm\classes\framebuffer.js -> node_modules\@luma.gl\webgl\dist\esm\classes\copy-and-blit.js -> node_modules\@luma.gl\webgl\dist\esm\webgl-utils\texture-utils.js Error: Circular dependency: node_modules\@luma.gl\webgl\dist\esm\classes\framebuffer.js -> node_modules\@luma.gl\webgl\dist\esm\features\index.js -> node_modules\@luma.gl\webgl\dist\esm\features\webgl-features-table.js -> node_modules\@luma.gl\webgl\dist\esm\classes\framebuffer.js Error: Circular dependency: node_modules\@math.gl\web-mercator\dist\esm\web-mercator-viewport.js -> node_modules\@math.gl\web-mercator\dist\esm\fit-bounds.js -> node_modules\@math.gl\web-mercator\dist\esm\web-mercator-viewport.js  
asked
1 answers
0

Hello,

When using Pluggable Widget tools v9.9.3, the Circular Dependencies appear as Warnings and don’t block the build of the widget. What version are you using?

Is there an additional message in red, at the bottom of your console?

Webpack does work differently to rollup, so you could downgrade the widget by changing your global install of @mendix/generator-widget (npm uninstall and then reinstall with the version you want e.g. npm i @mendix/generator-widget@8.13.3)

But you would lose access to parts of the Pluggable widget API released in 9.

Joe

answered