nextjs-blog-cms-sanity-v3 icon indicating copy to clipboard operation
nextjs-blog-cms-sanity-v3 copied to clipboard

Workspace not defined

Open Nichtkunst opened this issue 1 year ago • 3 comments

Hello,

I used the template. Clean install. Locally everyhting works. Then deploy npx sanity deploy.

  1. Have to fix all paths the related to the deployment, sanity, to absolute paths cause of vite - done. I can deploy.
  2. Studios runs but the preview doesn't work. Workspace not found

image

The only things I changed are the

  • title of the studio
  • .env vars to SANITY_* (yet this doesn't fix the issue when I deploy the CLI reads it out but the studio complains it is undefined - therefore I just write the values plain)

What causes the Workspace not found - I can't find anything that makes sense to me cause it is the starter. Please help.

git-repo: link

`import { visionTool } from '@sanity/vision' import { defineConfig } from 'sanity' import { deskTool } from 'sanity/desk' import { unsplashImageAsset } from 'sanity-plugin-asset-source-unsplash'

import { apiVersion, dataset, previewSecretId, projectId } from './lib/sanity.api' import { previewDocumentNode } from './plugins/previewPane' import { productionUrl } from './plugins/productionUrl' import { settingsPlugin, settingsStructure } from './plugins/settings' import authorType from './schemas/author' import postType from './schemas/post' import settingsType from './schemas/settings'

const title = process.env.SANITY_STUDIO_TITLE || 'Blog Kerstin Eibel'

export default defineConfig({ basePath: '/studio', projectId: "XXXX-XXXX", dataset: "production", title, schema: { types: [authorType, postType, settingsType], }, plugins: [ deskTool({ structure: settingsStructure(settingsType), defaultDocumentNode: previewDocumentNode({ apiVersion, previewSecretId }), }), settingsPlugin({ type: settingsType.name }), productionUrl({ apiVersion, previewSecretId, types: [postType.name, settingsType.name], }), unsplashImageAsset(), visionTool({ defaultApiVersion: apiVersion }), ], })`

Nichtkunst avatar Mar 06 '23 18:03 Nichtkunst