Issue using DuckDB in React Application

I am building a visualization to be used in a React Application and I am using the following method to import it into the app. I am using DuckDB like it is being used here Hello, DuckDB / Observable | Observable but I am changing the used data by changing the variable by assigning it to a variable.

When I try to embed the notebook as a React app and load it I get the following error on the variable that DDB_BM is assigned to:

DDB_BM = Error: Cannot find module ''

Is there a more efficient way to import DuckDB Wasm client into the application? I am thinking to put a dist in the build and just assign it to a variable but I wondering if someone has a more elegant solution.

Jesse, thanks for posting it here. Our team is looking into a fix for this problem (this is more complicated than we hoped!). As you probably figured out also, webpack is looking for the module to be locally installed instead of loading it from the CDN and we have not found a solution for that yet… but we have not given up!

Hi Cobus - just a +1 on this - I’m suffering from the same problem! Thanks!