Saskia Bobinska
Senior Support Engineer @Sanity
If you install plugins or other packages with conflicting (peer) dependencies, you can use this useful workaround to unblock yourself.
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:
styled-components
)--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!
Senior Support Engineer @Sanity
When creating custom document actions, it can be necessary to check, wether all validation rules are full-filled.
Go to Use the validation status of a document in your custom document actionsOnly return a value when a condition is fulfilled
Go to Conditional values in GROQ queriesIf you want to make it possible to use parameterised initialValue templates in reference fields, this is how!
Go to Create a new reference document with parameterised initial ValuesSometimes you need to change only one key-value-pair in your data, this is how you can do it in 2 lines
Go to Create a copy of an object and change a key-value pair