You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to create a new Next.js monorepo project using the shadcn CLI (canary version), the process fails due to missing workspace dependencies.
Affected component/components
CLI
How to reproduce
Steps to Reproduce
Run the following command: bunx --bun shadcn@canary init
Choose "Next.js (Monorepo)" when prompted to start a new project
Enter a project name (e.g., "test-monorp-shadcn")
Expected Behavior
The CLI should successfully create a new Next.js monorepo project with all necessary dependencies and configurations.
Actual Behavior
The CLI fails to create the project, reporting missing workspace dependencies:
✖ 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.
# Logs section...
Codesandbox/StackBlitz link
No response
Logs
PS C:\Users\Jozef\Desktop> bunx --bun shadcn@canary init
√ The path C:\Users\Jozef\Desktop does not contain a package.json file.
Would you like to start a new project? » Next.js (Monorepo)
√ What is your project named? ... test-monorp-shadcn
✖ 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
error: Workspace dependency "@workspace/eslint-config" not found
Searched in"..\..\..\..\..\C:\Users\Jozef\Desktop\test-monorp-shadcn\*"
Workspace documentation: https://bun.sh/docs/install/workspaces
error: Workspace dependency "@workspace/typescript-config" not found
Searched in"..\..\..\..\..\C:\Users\Jozef\Desktop\test-monorp-shadcn\*"
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)
System Info
- Operating System: Windows 11 version 23H2 (SO 22631.4602)
- Node.js version: v22.11.0
- Bun version: 1.1.42
- shadcn CLI version: canary
Before submitting
I've made research efforts and searched the documentation
I've searched for existing issues
The text was updated successfully, but these errors were encountered:
When using NPM, a similar error occurs, as it uses a package.json file following the PNPM standard, where imports are defined with "workspace:*". However, for NPM, it should be "*".
> npx shadcn@canary init
✔ The path /home/william/github does not contain a package.json file.
Would you like to start a new project? › Next.js (Monorepo)
✔ What is your project named? … shadcn
✖ 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/william/.npm/_logs/2024-12-22T15_42_12_265Z-debug-0.log
Describe the bug
When attempting to create a new Next.js monorepo project using the shadcn CLI (canary version), the process fails due to missing workspace dependencies.
Affected component/components
CLI
How to reproduce
Steps to Reproduce
bunx --bun shadcn@canary init
Expected Behavior
The CLI should successfully create a new Next.js monorepo project with all necessary dependencies and configurations.
Actual Behavior
The CLI fails to create the project, reporting missing workspace dependencies:
Codesandbox/StackBlitz link
No response
Logs
System Info
Before submitting
The text was updated successfully, but these errors were encountered: