sanity-io / sanity-plugin-internationalized-array

A plugin to register array fields with a custom input component to store field values in multiple languages, queryable by using the language ID as an array `_key`.
MIT License
42 stars 10 forks source link

Unable to resolve dependency tree #1

Closed Snugug closed 1 year ago

Snugug commented 1 year ago

On NPM 8.19.2, installing the v3 of this branch with a basic Sanity setup (fresh sanity init), I get the following error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: navy-cattle@1.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18" from @sanity/ui@1.0.0-beta.32
npm ERR! node_modules/@sanity/ui
npm ERR!   peer @sanity/ui@"1.0.0-beta.32" from sanity-plugin-internationalized-array@1.2.0
npm ERR!   node_modules/sanity-plugin-internationalized-array
npm ERR!     sanity-plugin-internationalized-array@"1.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See ~/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2022-11-22T19_27_29_342Z-debug-0.log

Re-running with --legacy-peer-deps works, but it looks like there are two different versions of React now expected and this results in weird errors with alt package managers like pnpm

Snugug commented 1 year ago

Didn't realize this was trying to be installed off of Sanity 2 codebase