shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
75.37k stars 4.72k forks source link

[bug]: components get creates in the root folder of the project #5527

Closed abdoaitwihi closed 1 month ago

abdoaitwihi commented 1 month ago

Describe the bug

This is my tsconfig.json

{ "compilerOptions": { "allowJs": true, "module": "ESNext", "moduleResolution": "bundler", "jsx": "react-jsx", "strict": true, "isolatedModules": true, "target": "ESNext", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "skipLibCheck": true, "noEmit": true, "paths": { "@/": ["./resources/js/"], "ziggy-js": ["./vendor/tightenco/ziggy"] } }, "include": [ "resources/js//*.ts", "resources/js/*/.tsx", "resources/js//*.d.ts" ] }

and this is components.json

{ "$schema": "https://ui.shadcn.com/schema.json", "style": "new-york", "rsc": false, "tsx": true, "tailwind": { "config": "tailwind.config.js", "css": "resources/css/app.css", "baseColor": "neutral", "cssVariables": true, "prefix": "" }, "aliases": { "components": "@/components", "utils": "@/lib/utils", "ui": "@/components/ui", "lib": "@/lib", "hooks": "@/hooks" } }

npx shadcn@latest add button creats the component in the root folder of the project

Affected component/components

all components get created in the root folder

How to reproduce

I had a project with laravel interia and react. I had also another project with the same config (laravel interia and react) which used to work fine , but know it has this problem of the comps being created in the root while they used to be created in the right location (resources/js/components/ui)

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

Windows pc.

Before submitting

ivan-plotnikov commented 1 month ago

Duplicates #5433