[bug]: Canary monorepo CLI ENOENT error
Describe the bug
The followin error occurs after running the cli install command:
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 /home/gsdev/dev/w82
spawn cd ENOENT
NOTE: The monorepo seems to install but only apps/web gets installed. I also tested this on an M1 mac and that worked fine.
Affected component/components
n/a
How to reproduce
- Install using the command provided in the monorepo docs:
pnpm dlx shadcn@canary init - Complete install wizard
- Error is thrown shortly after
Codesandbox/StackBlitz link
n/a
Logs
No response
System Info
Windows 11, WSL, Ubuntu 24.04
Before submitting
- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Hello, I got the same error
Same with bun got an error I am using WSL and I think it's most likely a problem with WSL
✖ 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: bun install
Resolving dependencies
Resolved, downloaded and extracted [24]
error: Workspace dependency "@workspace/eslint-config" not found
Searched in "./*"
Workspace documentation: https://bun.sh/docs/install/workspaces
error: Workspace dependency "@workspace/typescript-config" not found
Searched in "./*"
Workspace documentation: https://bun.sh/docs/install/workspaces
error: @workspace/eslint-config@* failed to resolve
error: @workspace/typescript-config@* failed to resolve
bun install v1.1.42 (50eec002)
used pnpm dlx shadcn@canary init and hit the same error
Same with bun got an error I am using WSL and I think it's most likely a problem with WSL
✖ 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: bun install Resolving dependencies Resolved, downloaded and extracted [24] error: Workspace dependency "@workspace/eslint-config" not found Searched in "./*" Workspace documentation: https://bun.sh/docs/install/workspaces error: Workspace dependency "@workspace/typescript-config" not found Searched in "./*" Workspace documentation: https://bun.sh/docs/install/workspaces error: @workspace/eslint-config@* failed to resolve error: @workspace/typescript-config@* failed to resolve bun install v1.1.42 (50eec002)
Am on Ubuntu though lol
+1
+1
+1
ubuntu@ip-172-31-9-98:~$ pnpm dlx shadcn@canary init ✔ The path /home/ubuntu does not contain a package.json file. Would you like to start a new project? › Next.js (Monorepo) ✔ What is your project named? … en ✖ 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 /home/ubuntu spawn cd ENOENT
ubuntu@ip-172-31-9-98:~$ npx shadcn@canary init Need to install the following packages: [email protected] Ok to proceed? (y) y
✔ The path /home/ubuntu does not contain a package.json file. Would you like to start a new project? › Next.js (Monorepo) ✔ What is your project named? … en
A project with the name en already exists. Please choose a different name and try again. same error please fix it @shadcn
Should be fixed now. can you try again?
Should be fixed now. can you try again?
Result:
➜ ~ pnpm dlx shadcn@canary init
✔ The path /home/noname does not contain a package.json file.
Would you like to start a new project? › Next.js (Monorepo)
✔ What is your project named? … test
✖ 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 /home/noname
spawn cd ENOENT
➜ ~ cd test
➜ test git:(master) ls
apps node_modules package.json packages pnpm-lock.yaml pnpm-workspace.yaml README.md tsconfig.json turbo.json
pnpm dlx shadcn@canary init ✔ The path /home/ubuntu does not contain a package.json file. Would you like to start a new project? › Next.js (Monorepo) ✔ What is your project named? … my-app ✖ 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 /home/ubuntu spawn cd ENOENT
and while using npm npx shadcn@canary init ✔ The path /home/ubuntu does not contain a package.json file. Would you like to start a new project? › Next.js (Monorepo) ✔ What is your project named? … my-app ✖ 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/ubuntu/.npm/_logs/2025-03-12T03_03_34_944Z-debug-0.log hey, @shadcn this problem is still not solve please fix it
Taking a look. Will see if I can reproduce.
Same here, WSL on WIndows 11
Same on Linux Debian 12, but not on Mac OsX. ZSH, NVM with Node 12 for both.
im having same issue but a with a slight variation
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.
dest already exists.```
@shadcn Any updates?
im having same issue but a with a slight variation
Something went wrong. Please check the error below for more details. If the problem persists, please open an issue on GitHub. dest already exists.```
I still have this same issue too. Running Manjaro Linux and tried with almost every package manager (npm, pnpm, bun). I also notice that the "dest already exists." error shows up when I specified the project name as "." to initiate the project in the current directory. when i tried the default option "my-app" I got the original error
➜ 12:55 jakka example-mono pnpm dlx shadcn@canary init
✔ The path /home/jakka/Code/example-mono does not contain a package.json file.
Would you like to start a new project? › Next.js (Monorepo)
✔ What is your project named? … my-app
✖ 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 /home/jakka/Code/example-mono
spawn cd ENOENT
getting this on macos with @latest and @canary if I set the app name to '.' I get this, if I input a name when prompted I get EUNSUPPORTEDPROTOCOL
npm error Unsupported URL Type "workspace:": workspace:*
I use Ubuntu. I am also having this issue.
iltan@iltan:~/projects$ pnpm dlx shadcn@canary init
WARN 1 deprecated subdependencies found: [email protected]
Packages: +293
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 293, reused 292, downloaded 1, added 293, done
✔ The path /home/iltan/projects does not contain a package.json file.
Would you like to start a new project? › Next.js (Monorepo)
✔ What is your project named? … shadcn-monorepo
✖ 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 /home/iltan/projects
spawn cd ENOENT
Also:
iltan@iltan:~/projects$ node -v
v22.17.1
iltan@iltan:~/projects$ npm -v
10.9.2
iltan@iltan:~/projects$ pnpm -v
10.13.1
Yeah I'm getting the same error on Linux. Tried npm, pnpm, bun.
bunx --bun shadcn@canary init
✔ The path /workspaces/echo-tutorial does not contain a package.json file.
Would you like to start a new project? › Next.js (Monorepo)
✔ What is your project named? … echo-tutorial
✖ 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: bun install
Resolving dependencies
Resolved, downloaded and extracted [26]
error: Workspace dependency "@workspace/eslint-config" not found
Searched in "./*"
Workspace documentation: https://bun.com/docs/install/workspaces
error: Workspace dependency "@workspace/typescript-config" not found
Searched in "./*"
Workspace documentation: https://bun.com/docs/install/workspaces
error: @workspace/eslint-config@workspace:* failed to resolve
error: @workspace/typescript-config@workspace:* failed to resolve
bun install v1.2.19 (aad3abea)
same error still
Fixed in #7962
Morning, guys. @shadcn I'm facing the same issue when running the pnpm dlx shadcn@canary init commadn on ubuntu 24.04.3 LtS
Node.js version: v22.21.0 pnpm version: 10.15.0
pnpm dlx shadcn@canary init
✔ The path /home/jesus-medina/Documents/GitHub/finstate-fe does not contain a package.json file.
Would you like to start a new project? › Next.js (Monorepo)
✔ What is your project named? … my-app
✖ 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 /home/jesus-medina/Documents/GitHub/finstate-fe
spawn cd ENOENT