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
41 stars 10 forks source link

Error when importing internationalizedArray #46

Closed oskarengstrom closed 9 months ago

oskarengstrom commented 10 months ago

I just installed the plugin and got this error when import {internationalizedArray} from 'sanity-plugin-internationalized-array' in sanity.config.js:

[1] ✘ [ERROR] No matching export in "node_modules/sanity/lib/index.esm.js" for import "defineDocumentFieldAction"
[1] 
[1]     node_modules/sanity-plugin-internationalized-array/lib/index.esm.js:1:215:
[1]       1 │ ...ient,useFormBuilder,defineDocumentFieldAction,useFormValue,set,A...
[1]         ╵                        ~~~~~~~~~~~~~~~~~~~~~~~~~
[1] 
[1] 10:18:01 AM [vite] error while updating dependencies:
[1] Error: Build failed with 1 error:
[1] node_modules/sanity-plugin-internationalized-array/lib/index.esm.js:1:215: ERROR: No matching export in "node_modules/sanity/lib/index.esm.js" for import "defineDocumentFieldAction"

Versions: "sanity": "^3.10.3", "sanity-plugin-internationalized-array": "^1.10.3",

SimeonGriggs commented 10 months ago

Could you try wiping node_modules and installing again?

mark-wvs commented 7 months ago

I am also receiving this error @SimeonGriggs - deleted node_modules and reinstalled but no difference.