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

Crashes on setup #68

Closed
jonasalfthan opened this issue Mar 4, 2024 · 1 comment
Closed

Crashes on setup #68

jonasalfthan opened this issue Mar 4, 2024 · 1 comment

Comments

@jonasalfthan
Copy link

node v18.17.0 (npm v9.6.7)

to recreate this I did this:

  1. npm create sanity@latest -- --template clean --create-project "testing recreating error" --dataset production
  2. I choose typescript
  3. npm i sanity-plugin-taxonomy-manager (I get tons of warnings about peerDependencies. (i am using react 18).
  4. sanity.config.ts looks like this:
import {defineConfig} from 'sanity'
import {structureTool} from 'sanity/structure'
import {visionTool} from '@sanity/vision'
import {schemaTypes} from './schemaTypes'
import {taxonomyManager} from 'sanity-plugin-taxonomy-manager'

export default defineConfig({
  name: 'default',
  title: 'testing recreating error',

  projectId: 'xyz',
  dataset: 'production',

  plugins: [structureTool(), visionTool(), taxonomyManager({})],

  schema: {
    types: schemaTypes,
  },
})
  1. http://localhost:3333/structure/skosConceptScheme
  2. clicking "create new document" gives 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 responsiveStackSpaceStyle (http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-taxonomy-manager.js?v=de521cfd:16053:5)
    at _e (http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-taxonomy-manager.js?v=de521cfd:1444:14)
    at e3.generateAndInjectStyles (http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-taxonomy-manager.js?v=de521cfd:1312:20)
    at http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-taxonomy-manager.js?v=de521cfd:1561:88
    at http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-taxonomy-manager.js?v=de521cfd:1563:8
    at P2 (http://localhost:3333/node_modules/.sanity/vite/deps/sanity-plugin-taxonomy-manager.js?v=de521cfd:1567:6)
    at renderWithHooks (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-RLXDOXHA.js?v=de521cfd:18881:26)
    at updateForwardRef (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-RLXDOXHA.js?v=de521cfd:21037:28)
    at beginWork (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-RLXDOXHA.js?v=de521cfd:22644:22)
    at beginWork$1 (http://localhost:3333/node_modules/.sanity/vite/deps/chunk-RLXDOXHA.js?v=de521cfd:26459:22)
@andybywire
Copy link
Owner

Hi @jonasalfthan,
Thanks for the detailed report. I’ve updated plugin packages and dependencies, removed a few that are no longer being used, and published a patch version to NPM. The update works without error for me on existing projects and in an exact duplicate of the steps you’ve laid out above.
You should be able to install smoothly now. Please do let me know if you see any errors at all or have any other issues.

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

2 participants