🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

What to do when Studio crashes due to conflicts in dependency versions?

By Saskia Bobinska

If you install plugins or other packages with conflicting (peer) dependencies, you can use this useful workaround to unblock yourself.

Add the flag to your npm install command

npm i <package name> --legacy-peer-deps

Sometimes, when we update the studio to use a newer version of a package (with breaking changes to an older version), your studio can crash if the same package is used in an older version in plugins or custom tools, etc. (see this example on GitHub).

In these cases, you don't have to panic, stay on the studio's older (minor) version, or uninstall the plugin or tool. 😮‍💨

You can simply:

  1. File an issue in the plugin to update the dependencies to the newer version of the package in case (like styled-components)
  2. Reinstall the plugin using the peer-legacy flag in NPM --legacy-peer-deps

If this does not work, you might need to remove your node modules, delete your lock-file, and reinstall everything using the flag again.

Happy coding!

Contributor

Other schemas by author