-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Problem
When using the shadcn CLI to generate a new Next.js monorepo project, the CLI successfully gets started on scaffolding a repo, but the CLI errors out before it can finish. It's not clear to me whether or not there was more scaffolding work to be done. I've tested this with both npm
and pnpm
.
Is This Only a Problem With the Monorepo Example?
Yes. I verified that the CLI completes successfully when trying to scaffold a regular Next.js repo.
Screenshots
Error - Try to generate a Next.js monorepo using npm

Error - Try to generate a Next.js monorepo using pnpm

Success! - Try to generate a regular Next.js repo using npm

Affected component/components
CLI, specifically the monorepo example
How to reproduce
How to reproduce the bug
- Create an empty folder and cd into it:
mkdir shadcn-monorepo-example && cd shadcn-monorepo-example
- Execute the shadcn CLI:
npx shadcn@canary init
orpnpm dlx shadcn@canary init
- When asked project type, select `Next.js (monorepo)
How to reproduce my environment
- Ideally, use a Windows 11 machine with WSL 2. However, you could also probably use macOS and be fine.
- Open VSCode and create a dev container
// .devcontainer/devcontainer.json
{
"name": "Node.js & TypeScript",
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm"
}
- From the command pallette, run
Dev Containers: Reopen in Container
Codesandbox/StackBlitz link
Not applicable
Logs
**npm** - `npx shadcn@canary init`
✖ Something went wrong creating a new Next.js monorepo.
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.
Command failed with exit code 1: npm install
npm error code EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*
npm error A complete log of this run can be found in: /home/node/.npm/_logs/2025-10-01T20_37_54_748Z-debug-0.log
**pnpm** - `pnpm dlx shadcn@canary init`
✖ Something went wrong creating a new Next.js monorepo.
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.
Command failed with ENOENT: cd /workspaces/shadcn-monorepo-example
spawn cd ENOENT
System Info
OS: Windows 11 with WSL 2
Dev Environment: VSCode dev container - `mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm`
Before submitting
- I've made research efforts and searched the documentation
- I've searched for existing issues
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working