Error importing sendbird-calls-javascript in React app (create react app)

I’m a dev for a telehealth startup working on integrating sendbird for video chats I’m hitting a snag. I read the documentation and tried both types of imports.

If I use:
import SendBirdCall from “sendbird-calls”

I get the error:
Attempted import error: ‘sendbird-calls’ does not contain a default export (imported as ‘SendBirdCall’).

I’ve tried adding these settings in my jsconfog.json file:
“allowSyntheticDefaultImports”: true,
“esModuleInterop”: true,

and importing with this:

import * as SendBirdCall from “sendbird-calls”

as suggested by the read me at github (GitHub - sendbird/sendbird-calls-javascript: A guide of Sendbird Calls SDK for JavaScript for an engaging voice and video call experience.) but that didn’t work either.

Anything thoughts or suggestions?


Of course I find a solution after posting the this! I just stumbled on a fix so I thought I’d share it.

We’re using craco.js in our app configuration. I started poking around in there and found someone else who had the same issue.

The solution was simply this:

“I think it’s include.concat([absolutePath]) with parentheses

Hopefully this will save someone some time down the road…

1 Like