Cannot find module '@react-native-async-storage/async-storage' or its corresponding type declarations.

Getting build error when trying to build a react project which includes @sendbird/Chat package. any help to fix this would be really appreciated.

node_modules/@sendbird/chat/lib/__definition.d.ts:1:31 - error TS2307: Cannot find module ‘@react-native-async-storage/async-storage’ or its corresponding type declarations.

1 import type AsyncStorage from ‘@react-native-async-storage/async-storage’;

1 Like

@Mohan007 having the same issue. Looking at this commit:

v4.0.0-beta.12 · sendbird/sendbird-chat-sdk-javascript@62b2124 · GitHub

Seems like @react-native-async-storage/async-storage was added as an “optional” peer dependency, but then also imported in the lib/__definition.d.ts file, kind of making it none optional.

Not sure if this was a mistake, but seems like this will force you to add @react-native-async-storage/async-storage package to your application which in turn will force you to add react-native to your application (which I 100% do not want to do)

Hoping Sendbird can fix this ASAP please…

Facing the same issue while integrating sendbird latest SDK in my angular project. Hope this is resolved soon (fingers crossed)

Hello @Mohan007, @Ruanvm23, and @Youshea_Khan. Welcome to the Sendbird Community!

We recommend that you enabled skipLibCheck in your tsconfig.json. That will address the error message that you receive when compiling your application.

Thank you @Ian_Wright for the response. This is a workaround that some of the team members are not comfortable with. I would like to know when the actual fix is going to be released.

Thank you!

1 Like