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

Using all:part:@sanity/base/schema-type Does Not include Document Type colorPicker #8

Open
MarioGiancini opened this issue Sep 30, 2022 · 1 comment

Comments

@MarioGiancini
Copy link

After running sanity install color-picker and adding a the type to a document field like:

// [...]
{
  fields: [
    // [...]
    {
      name: 'color',
      title: 'Color',
      type: 'colorPicker'
    }
  ]
}

the Error Unknown type: colorPicker. is shown.

Relying on the import schemaTypes from 'all:part:@sanity/base/schema-type' within schema.js to include the colorPicker document doesn't seem to work.

As a temp workaround, I've including the colorPicker document type directly like:
import colorPicker from '../node_modules/sanity-plugin-color-picker/lib/schema/index'

Sanity versions:

    "@sanity/base": "^2.33.3",
    "@sanity/core": "^2.33.3",
    "@sanity/dashboard": "^2.34.0",
    "@sanity/default-layout": "^2.33.3",
    "@sanity/default-login": "^2.33.3",
    "@sanity/desk-tool": "^2.33.3",
    "@sanity/eslint-config-studio": "^2.0.0",
    "@sanity/ui": "^0.37.12",
    "@sanity/vision": "^2.33.3",
@marionjudy13
Copy link

@MarioGiancini Any luck with this? I'm having the same issue, but I'm not sure how to do the workaround either. Where are you putting this? import colorPicker from '../node_modules/sanity-plugin-color-picker/lib/schema/index'

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