Meeting JS SDK wrong Package.json dependencies

Format Your New Topic as Follows:

Meeting SDK Type and Version
JS SDK version 3.8.5

Description
The way you’ve declared your package.json means that npm both downloads unnecessary dependencies and causes conflicts.

Error?
When running npm install you are shown “warning " > @zoom/meetingsdk@3.8.10” has incorrect peer dependency “react-dom@18.2.0”."

However, the problem is more severe, because you have also declared a dependencies object, the install command forcefully installs version 18.2.0 even if my app is using a compatible but not-exactly-identical version.

Instead, you should both:

  1. Do not declare both peerDependencies and dependencies. Ideally you would declare a devDependencies and peerDependencies. By declaring dependencies and peerDependencies, you are forcing those dependencies to all both be added to projects that use your app and then also bundling them inside of your compiled library.
  2. Declare ranges of acceptable versions for your various dependencies. E.G. do not depend on react 18.2.0 but rather on >18.2.0 or ^18.2.0. This will allow those who use your library to accept minor updates and security updates. Right now doing so will both cause the above peerDependencies warning and also force a conflicting and outdated version to be installed alongside it (potentially causing breaks or conflicts).

Troubleshooting Routes
You don’t need to trouble shoot - you can just look at the PR I’ve opened that shows the change you need to make. I would link directly but your forum doesn’t allow that - so just go look at PR 50 in your meeting-sdk repo.

How To Reproduce

  1. Make a new react app
  2. Add your SDK as a dependency
  3. Run install in your package manager