# Issue using DuckDB in React Application

**URL:** <https://talk.observablehq.com/t/issue-using-duckdb-in-react-application/7747>\
**Category:** Help\
**Created:** [March 14, 2023, 9:02pm UTC](https://talk.observablehq.com/t/issue-using-duckdb-in-react-application/7747 "2023-03-14T21:02:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jessethompson](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jessethompson](https://talk.observablehq.com/u/jessethompson)\
**Post date:** [March 14, 2023, 9:02pm UTC](https://talk.observablehq.com/t/issue-using-duckdb-in-react-application/7747/1 "2023-03-14T21:02:10Z")

</div>

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](https://observablehq.com/@observablehq/duckdb) 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 'https://cdn.observableusercontent.com/npm/@duckdb/duckdb-wasm@1.17.0/+esm'`

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.

---

<div class="post-metadata">

**Author:** ![Cobus](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/cobus/32/9670_2.png) [@Cobus](https://talk.observablehq.com/u/Cobus)\
**Post date:** [March 14, 2023, 10:50pm UTC](https://talk.observablehq.com/t/issue-using-duckdb-in-react-application/7747/2 "2023-03-14T22:50:59Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![RobinL](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/robinl/32/726_2.png) [@RobinL](https://talk.observablehq.com/u/RobinL)\
**Post date:** [September 13, 2023, 8:55am UTC](https://talk.observablehq.com/t/issue-using-duckdb-in-react-application/7747/3 "2023-09-13T08:55:37Z")

</div>

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