Skip to content

fix(ai-shopping-assistant): remove workspaces field to fix package manager detection#5

Merged
kenjonespizza merged 1 commit intomainfrom
fix-yarn-workspace-detection
Mar 3, 2026
Merged

fix(ai-shopping-assistant): remove workspaces field to fix package manager detection#5
kenjonespizza merged 1 commit intomainfrom
fix-yarn-workspace-detection

Conversation

@kenjonespizza
Copy link
Copy Markdown
Contributor

Summary

  • Removes the "workspaces" field from ai-shopping-assistant/package.json
  • The preferred-pm library (used by the Sanity CLI) calls find-yarn-workspace-root which treats the workspaces field as a Yarn workspace indicator — defaulting to yarn even without a yarn.lock
  • This caused npm create sanity@latest --template sanity-labs/starters/ai-shopping-assistant to fail with EPERM: yarn install
  • Workspaces are already defined in pnpm-workspace.yaml, so the field was redundant

Test plan

  • Run npm create sanity@latest -- --template sanity-labs/starters/ai-shopping-assistant and verify the CLI prompts for package manager selection (or detects pnpm correctly)
  • Verify pnpm install and workspace scripts (pnpm dev, pnpm --filter app run dev) still work

🤖 Generated with Claude Code

…nager detection

The `preferred-pm` library used by the Sanity CLI treats the
`workspaces` field in package.json as a Yarn workspace indicator,
causing it to default to yarn even without a yarn.lock. This broke
`npm create sanity@latest --template` with an EPERM error when
corepack or the system had yarn available.

The workspaces are already defined in pnpm-workspace.yaml, so the
field in package.json was redundant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kenjonespizza kenjonespizza temporarily deployed to ai-shopping-assistant March 3, 2026 14:59 — with GitHub Actions Inactive
@kenjonespizza kenjonespizza temporarily deployed to agentic-localization March 3, 2026 14:59 — with GitHub Actions Inactive
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-shopping-assistant Building Building Preview, Comment Mar 3, 2026 2:59pm

Request Review

@kenjonespizza kenjonespizza merged commit 4e9cd77 into main Mar 3, 2026
3 of 4 checks passed
@kenjonespizza kenjonespizza deleted the fix-yarn-workspace-detection branch March 3, 2026 14:59
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

Successfully merging this pull request may close these issues.

1 participant