sanity-io / orderable-document-list

Drag-and-drop Document Ordering without leaving the Editing surface
MIT License
75 stars 22 forks source link

Attempted import error: 'Preview' is not exported from 'sanity' (imported as 'o'). #43

Closed trevorpfiz closed 1 year ago

trevorpfiz commented 1 year ago

./node_modules/@sanity/orderable-document-list/lib/index.esm.js Attempted import error: 'Preview' is not exported from 'sanity' (imported as 'o').

I am attempting to add Orderable Document List to nextjs-blog-cms-sanity-v3.

I also notice that the docs on sanity.io and github are different, and SructureBuilder is imported but not used.

When I am at /studio it lists Orderable post, Orderable author, etc. When I click I get this error: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports..

Is there a working example of this plugin in Sanity Studio v3?

Thanks!

trevorpfiz commented 1 year ago

I was able to fix this by using the latest versions of sanity and orderable document-list.

"sanity": "^3.0.0-rc.3", "@sanity/orderable-document-list": "^1.0.1",