Cometchat not working with latest expo

I am trying cometchat pro in my expo project and getting following error:
Failed to compile.
C:/private/ChatHouse/node_modules/@cometchat-pro/react-native-chat/CometChat.js
Module not found: Can’t resolve ‘@cometchat-pro/react-native-calls’ in ‘C:\private\ChatHouse\node_modules@cometchat-pro\react-native-chat’

my packagejson is:

Hello @gyan,

It looks like you haven’t installed the calling component package @cometchat-pro/react-native-calls. You can follow the documentation here.

Warm Regards,

CometChat Pro
Mayur Bhandari

Thanks for prompt response. After this I see previous problem is gone but one problem still exists:

C:/private/ChatHouse/node_modules/@cometchat-pro/react-native-calls/CallScreen.js 19:22Module parse failed: Unexpected token (19:22)You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders| | class CallScreen extends React.Component{>   static defaultProps = {};| |   constructor(props) {

My package.json is:

Hello @gyan,

Can you please let us know when do you get this error?

Warm Regards,

CometChat Pro
Mayur Bhandari

After launching the web browser in expo. Here is the expo cli screenshot.

Hello @gyan,

Can you please try running the app in a mobile device instead of browser.

Warm Regards,

CometChat Pro
Mayur Bhandari

I tried running in android simulator and it is launching. But I cannot run in the web browser which is our main scenario. Could you please advise how to run on web?

Hello @gyan,

It looks like an issue with the webpack configuration of either your app or expo. You might have to change webpack configuration to make it work on the browser. Also, can you please let us know if you are integrating on Android, iOS and browser using react native or just browser?

Warm Regards,

CometChat Pro
Mayur Bhandari

I am not using any my own webpack config. Can you suggest what and where could be the change in the webpack.config of expo?
My first scenario is integration with browser using react native.

Hello @gyan,

Expo uses webpack configuration by default. You can follow the documentation of Expo for using a custom webpack. I just wanted to let you know that our calling component is not compatible with Expo CLI based apps. We have a feature request for the same and have added your email to the list of subscribers. You will get the update via email when/if the product team decides to take this up. You can follow the feature request here.

Expo Documentation: Customizing Webpack - Expo Documentation

Warm Regards,

CometChat Pro
Mayur Bhandari

1 Like

Hi @gyan,
I have replied to you on this by e-mail as well.
For any technical support, please feel free to reach out to us via email on help@cometchat.com or simply chat with us using the chatbot on your CometChat dashboard.
Please feel free to reach out to us if you have any further questions.:slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.