-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using the default command to start a new next.js project via pnpm it adds a pnpm-workspace.yaml file with a single packages entry (It seems like the main purpose of it is to add ignoredBuiltDependencies):
packages:
- .
ignoredBuiltDependencies:
- sharp
- unrs-resolverThis results in an error when running shadcn init:
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: pnpm add clsx tailwind-merge class-variance-authority lucide-react
\u2009ERR_PNPM_ADDING_TO_ROOT\u2009 Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true.
It seems like shadcn does not detect it's technically in the root of a workspaces project and pnpm doesn't allow to implicitly install anything in the root.
I've labeled this as a bug, as I think just adding shadcn to the default next.js installation should not result in an error.
Affected component/components
init
How to reproduce
- pnpm create next-app@latest my-app --yes
- cd my-app
- pnpm dlx shadcn@latest init
Codesandbox/StackBlitz link
No response
Logs
System Info
Not relevantBefore submitting
- I've made research efforts and searched the documentation
- I've searched for existing issues
joshuademarco
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working