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

Error: Can't resolve 'sanity' in v3 branch #2

Closed Snugug closed 1 year ago

Snugug commented 1 year ago

Using the v3 install (npm i sanity-plugin-internationalized-array@studio-v3), when I go to add the example on the plugin page I get the following error:

Failed to compile.

Error in ./node_modules/sanity-plugin-internationalized-array/lib/index.esm.js
Module not found: Error: Can't resolve 'sanity' in '~/sanity-demo/node_modules/sanity-plugin-internationalized-array/lib'
 @ ./node_modules/sanity-plugin-internationalized-array/lib/index.esm.js 1:695-842
 @ ./schemas/person.js
 @ ./schemas/schema.js (part:@sanity/base/schema)
 @ ./node_modules/@sanity/default-layout/lib/schemaErrors/SchemaErrorReporter.js
 @ ./node_modules/@sanity/default-layout/lib/defaultLayout/DefaultLayout.js
 @ ./node_modules/@sanity/default-layout/lib/defaultLayout/index.js
 @ ./node_modules/@sanity/default-layout/lib/Root.js (part:@sanity/default-layout/root)
 @ ./plugins/sanity-plugin-tutorial/CustomDefaultLayout.js (part:@sanity/base/root)
 @ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
 @ ./node_modules/@sanity/server/lib/browser/entry-dev.js
 @ multi ./node_modules/@sanity/server/lib/browser/entry-dev.js
Snugug commented 1 year ago

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