Quick Reference
Dependency Change
Chat SDK
- JavaScript
Calls SDK
- JavaScript
Change The Import Statements
Change the import statements all around the project.Chat SDK
- JavaScript
Calls SDK
- JavaScript
Best Practices
Best Practices
- Update both the Chat SDK and Calls SDK together to avoid version incompatibilities
- After updating dependencies, do a clean build (
npx react-native start --reset-cache) to clear any cached modules - Search your entire project for old import paths (
@cometchat-pro/react-native-chat) and replace them with the new v4 paths - Test all listeners and callbacks after upgrading — some callback signatures may have changed between v3 and v4
Troubleshooting
Troubleshooting
- Module not found errors: Ensure you’ve removed the old v3 packages (
@cometchat-pro/react-native-chat) and installed the new v4 packages. - Duplicate module errors: Run
npm dedupeor deletenode_modulesand reinstall to resolve conflicting versions. - iOS build fails after upgrade: Run
pod install --repo-updatein theios/directory to update native dependencies. - Android build fails: Clean the build with
./gradlew cleanin theandroid/directory and rebuild.