sanity-io / sanity-plugin-google-translate

Translate your content with Google Translate directly from your Sanity Studio!
MIT License
8 stars 5 forks source link

Cannot destructure property 'media' of 'theme.sanity' as it is undefined. #18

Open kapyar opened 1 year ago

kapyar commented 1 year ago

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 responsiveStackSpaceStyle (http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-google-translate.js?v=2eee4417:30946:11) at Ne (http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-google-translate.js?v=2eee4417:491:14) at e2.generateAndInjectStyles (http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-google-translate.js?v=2eee4417:359:19) at http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-google-translate.js?v=2eee4417:610:88 at http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-google-translate.js?v=2eee4417:612:8 at O (http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-google-translate.js?v=2eee4417:616:6) at renderWithHooks (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-MIB3JJOG.js?v=2eee4417:12171:26) at updateForwardRef (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-MIB3JJOG.js?v=2eee4417:14327:28) at beginWork (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-MIB3JJOG.js?v=2eee4417:15934:22) at beginWork$1 (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-MIB3JJOG.js?v=2eee4417:19749:22)

TheWagener commented 1 year ago

@kapyar Hey there. Running into the same error. Did you ever get past it?

Steffi3rd commented 10 months ago

Any solution here?

norio-club commented 9 months ago

Any solution for this?

norio-club commented 9 months ago

We just solved this by downloading the source code https://github.com/sanity-io/sanity-plugin-google-translate/releases

and injecting it inside of our project.

gruberro commented 9 months ago

Using https://www.npmjs.com/package/yarn-deduplicate helped in my case.

guillermo-avalos commented 4 months ago

Using https://www.npmjs.com/package/yarn-deduplicate helped in my case.

What if I'm not using yarn? Has anyone figured this out?

minaelee commented 4 months ago

Using https://www.npmjs.com/package/yarn-deduplicate helped in my case.

What if I'm not using yarn? Has anyone figured this out?

If you're using npm, you can try npm dedupe instead.

https://docs.npmjs.com/cli/v8/commands/npm-dedupe

guillermo-avalos commented 4 months ago

Using https://www.npmjs.com/package/yarn-deduplicate helped in my case.

What if I'm not using yarn? Has anyone figured this out?

If you're using npm, you can try npm dedupe instead.

https://docs.npmjs.com/cli/v8/commands/npm-dedupe

Thank you! tried it but still not working.

Oscin commented 4 months ago

Using https://www.npmjs.com/package/yarn-deduplicate helped in my case.

What if I'm not using yarn? Has anyone figured this out?

If you're using npm, you can try npm dedupe instead. https://docs.npmjs.com/cli/v8/commands/npm-dedupe

Thank you! tried it but still not working.

Having the same bug. Tried including like suggested by @norio-org, but this didn't resolved the error. Also tried updating google translate package to the latest version of styled-components and @sanity/plugin-kit, but this did not resolve the error. @runeb @SimeonGriggs Any ideas how to make this compatible with the latest Sanity version?