[bug]: --src-dir flag on create errors
Describe the bug
When using the --src-dir flag on the new create command in the shadcn CLI, the CLI errors.
pnpm dlx shadcn@latest create --preset "https://ui.shadcn.com/init?base=base&style=mira&baseColor=neutral&theme=pink&iconLibrary=lucide&font=inter&menuAccent=subtle&menuColor=default&radius=default&template=next" --template next --src-dir blades
✔ Creating a new Next.js project.
✔ Writing components.json.
✔ Checking registry.
✔ Updating CSS variables in src/app/globals.css
✔ Updating src/app/globals.css
✔ Installing dependencies.
✔ Updating fonts.
✔ Created 1 file:
- src/lib/utils.ts
⠋ Updating ..
Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.
ENOENT: no such file or directory, open ''
Affected component/components
CLI
How to reproduce
Run pnpm dlx shadcn@latest create --src-dir
Codesandbox/StackBlitz link
No response
Logs
System Info
macOS terminal
Before submitting
- [x] I've made research efforts and searched the documentation
- [x] I've searched for existing issues
Issue confirmed, but this created a project that is working. Did it work for you as well?
Image
Issue confirmed, but this created a project that is working. Did it work for you as well?
Hi @yeasin2002, yes the project did get made, but I think it's missing a components directory with shadcn components and the rest of the template. More generally, configuration of the Next.js project itself isn't really possible (e.g., changing the linter or import alias) normally achieved using the normal Next.js installation CLI (https://nextjs.org/docs/app/getting-started/installation).