Manny R
12/05/2025, 7:06 PMManny R
12/08/2025, 3:13 PMChiranjeet Mishra
12/12/2025, 4:55 PMreact-scripts (from Create React App) has known limitations with fully handling modern ESM imports. This causes the runtime error you’re seeing when using the SDK in a CRA project.
Recommended Fix:
Since this project is experimental/testing, the easiest solution is to initialize your app with Vite, which has first-class support for ESM and works seamlessly with the Vapi React SDK.
You can create a Vite-based React app like this:
npm create vite@latest my-vapi-app -- --template react
Vite handles modern ESM-based packages out of the box, so the error should no longer occur.
Let me know if you face the same issue in the React-Vite setup!
Best,
Vikash