Skip to content

Manifest extraction breaks if using a dependency #10917

@masylum

Description

@masylum

I'm using pnpm workspaces and trying to require the configuration from a dependency and it breaks.

// sanity.config.ts
import { defineConfig } from "sanity"
import { config } from "@repo/sanity-cms/src/config.js"

export default defineConfig(config)

where "@repo/sanity-cms": "workspace:*" in package.json.

pnpm sanity manifest extract
✗ Failed to load configuration file "/Users/pao/repos/ramensoft/apps/fika-cms/sanity.config.ts"

Error: Failed to load configuration file "/Users/pao/repos/ramensoft/apps/fika-cms/sanity.config.ts"
    at getStudioConfig (~/repos/ramensoft/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@sanity+s_fd60a6acc5ca3663d81167f0758af843/node_modules/sanity/lib/_chunks-cjs/getStudioWorkspaces.js:25:13)
    at Object.getStudioWorkspaces (~/repos/ramensoft/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@sanity+s_fd60a6acc5ca3663d81167f0758af843/node_modules/sanity/lib/_chunks-cjs/getStudioWorkspaces.js:43:20)
    at main (~/repos/ramensoft/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@sanity+s_fd60a6acc5ca3663d81167f0758af843/node_modules/sanity/lib/_internal/cli/threads/extractManifest.js:406:50)
    at Object.<anonymous> (~/repos/ramensoft/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@sanity+s_fd60a6acc5ca3663d81167f0758af843/node_modules/sanity/lib/_internal/cli/threads/extractManifest.js:415:1)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)

Caused by:

Error: Cannot find module '@repo/sanity-cms/src/config.js'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions