New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error after running shadcn-ui init command #746
Comments
@chongweiguan Are you using the |
Hi! if you are asking if the src folder is my working directory when running |
Then you must say it in this prompt ( - Where is your global CSS file? › app/globals.css
+ Where is your global CSS file? › src/app/globals.css Otherwise a new |
If you already have the - "css": "app/globals.css",
+ "css": "src/app/globals.css", |
Oh ok it is working now! Thank you very much for the help! |
can i see your components.json @chongweiguan |
I have the same issue however my project is a pre existing project with lots of code in the app folder. How to resolve it without deleting app folder? |
@EugenePeter You don't have to delete the original app folder, just the one that the CLI created. |
Then you have to edit the path of the css in the - "css": "app/globals.css",
+ "css": "src/app/globals.css", (Assuming that you're using the |
It's working as expected now . Cheers @dan5py |
Still Not Working...& Showing 404 on browser. |
After updating the components.json file the error still exists. My solution was that I have to the delete the app/globals.css folder. In my project structure exists the globals.css twice.
After deleting the app/globals.css the app works as expected again. |
There seems to be an issue with the shadcn-ui init command.
When creating a new project using
npx create-next-app@latest my-app --typescript --tailwind --eslint
, and then runningnpm run dev
. No issues so far, the page displayed is shown below.Next, I ran
npx shadcn-ui@latest init
and chose the default settings, shown belowHowever, after running
npm run dev
again, an error is shownI really enjoy using shadcn and I hope this can be fixed soon! This seems to be a similar issue faced by #745. Do let me know if you need me to provide other information for you
The text was updated successfully, but these errors were encountered: