Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanity Table Plugin doesn't work with the latest @sanity/ui package version #37

Open
aquarius-software opened this issue Apr 24, 2024 · 0 comments

Comments

@aquarius-software
Copy link

Sanity Table Plugin doesn't work after upgrading @sanity/ui package from v2.0.2 to the latest v2.1.4.

To reproduce, go to Sanity Studio and select any document, and then clicking a table in the document causes the following error.

Error: Cannot destructure property 'media' of 'theme.sanity' as it is undefined.
TypeError: Cannot destructure property 'media' of 'theme.sanity' as it is undefined.
    at responsiveFlexItemStyle (webpack-internal:///(app-pages-browser)/../../node_modules/@sanity/table/node_modules/@sanity/ui/dist/index.esm.js:3791:13)
    at _e (webpack-internal:///(app-pages-browser)/../../node_modules/styled-components/dist/styled-components.browser.esm.js:456:17)
    at _e (webpack-internal:///(app-pages-browser)/../../node_modules/styled-components/dist/styled-components.browser.esm.js:449:75)
    at _e (webpack-internal:///(app-pages-browser)/../../node_modules/styled-components/dist/styled-components.browser.esm.js:457:284)
    at e.generateAndInjectStyles (webpack-internal:///(app-pages-browser)/../../node_modules/styled-components/dist/styled-components.browser.esm.js:310:29)
    at eval (webpack-internal:///(app-pages-browser)/../../node_modules/styled-components/dist/styled-components.browser.esm.js:580:88)
    at eval (webpack-internal:///(app-pages-browser)/../../node_modules/styled-components/dist/styled-components.browser.esm.js:582:14)
    at P (webpack-internal:///(app-pages-browser)/../../node_modules/styled-components/dist/styled-components.browser.esm.js:585:10)
    at renderWithHooks (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:9745:28)
    at updateForwardRef (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:13758:32)
    at beginWork$1 (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:15982:32)
    at beginWork (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:22789:28)
    at performUnitOfWork (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21852:24)
    at workLoopSync (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21617:17)
    at renderRootSync (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21584:21)
    at recoverFromConcurrentError (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:20917:30)
    at performSyncWorkOnRoot (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:21134:34)
    at flushSyncWorkAcrossRoots_impl (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:9119:33)
    at flushSyncWorkOnAllRoots (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:9085:13)
    at processRootScheduleInMicrotask (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:9207:13)
    at eval (webpack-internal:///(app-pages-browser)/../../node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:9353:21)

package.json in @sanity/table says that @sanity/ui dependency is v1.0.0. Is there any plan to update @sanity/table in accordance with the latest @sanity/ui? Or is there any other way to solve this error?

Which versions of Sanity are you using?
3.8.3

What operating system are you using?
macOS 14.4.1

Which versions of Node.js / npm are you running?
v20.9.0 / v10.1.0npm dependency versions
sanity: v3.28.0
next-sanity: v8.0.0
@sanity/table: v1.1.2
@sanity/ui: v2.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant