Skip to main content
Key changes from v3 to v4:
  • Chat SDK: npm i @cometchat/chat-sdk-javascript
  • Calls SDK: npm i @cometchat/calls-sdk-javascript
  • Import: import { CometChat } from '@cometchat/chat-sdk-javascript'
  • Import Calls: import { CometChatCalls } from '@cometchat/calls-sdk-javascript'
Upgrading from v3 to v4 is straightforward — the API surface is the same, only the package names and imports changed. Follow the v4 setup instructions first, then update your dependencies and imports as shown below.

Update Dependencies

SDKv3 Packagev4 Package
Chat SDK@cometchat-pro/chat@cometchat/chat-sdk-javascript
Calls SDK@cometchat-pro/calls@cometchat/calls-sdk-javascript
# Remove v3 packages
npm uninstall @cometchat-pro/chat @cometchat-pro/calls

# Install v4 packages
npm i @cometchat/chat-sdk-javascript
npm i @cometchat/calls-sdk-javascript

Update Import Statements

Find and replace all import statements across your project:
SDKv3 Importv4 Import
Chat SDKimport { CometChat } from '@cometchat-pro/chat'import { CometChat } from '@cometchat/chat-sdk-javascript'
Calls SDKimport { CometChatCalls } from '@cometchat-pro/calls'import { CometChatCalls } from '@cometchat/calls-sdk-javascript'
// v4 Chat SDK
import { CometChat } from '@cometchat/chat-sdk-javascript';

// v4 Calls SDK
import { CometChatCalls } from '@cometchat/calls-sdk-javascript';
The API methods, class names, and listener interfaces are unchanged between v3 and v4. Once you update the packages and imports, your existing code should work without further modifications.

Next Steps

Setup SDK

Install and configure the CometChat JavaScript SDK

Changelog

Latest SDK version and release notes

Best Practices

Recommended patterns for building with the SDK

Key Concepts

Learn the core concepts behind CometChat v4