ui icon indicating copy to clipboard operation
ui copied to clipboard

Frustrating error causing 404 on every route, src/ directory

Open kiikoh opened this issue 7 months ago • 1 comments

I probably just spent the last hour trying to debug a problem that occurred after installing shadcn-ui. I was using a create-t3-app.

Essentially the problem boiled down to this. I was using the src directory, I ran the setup command and it created an empty app directory in the repo route. Git didn't even see the change since it was empty so I was completely unaware this was even created, so I was even more confused when I git reset and things weren't fixed, leading me to clear all my package manager caches, try different package managers, etc.

This is probably a "skill issue" but I wasn't able to catch the bug until I re-cloned the repo and it ran as expected because the empty directory get propagated to git.

This is probably a shared issue with Next but extra care should be taken to make sure an empty directory is not created, as it takes precedence over a src/ directory.

kiikoh avatar Nov 18 '23 02:11 kiikoh

Realizing now this is well duplicated but I still got the error... #755 #1821 #978 etc

One issue was closed stating that you can choose which directory but I believe it can be simplified... Would it be possible to scan the app and autofill the most likely correct file paths?

e.g. Search full directory for .css file containing tailwind code Search full, directory for tailwind config file, be it .ts, .cjs, .mjs, .js Search for whatever nextjs is using as the directory Search for a folder that contains the words components (_components should match as a fall back)

kiikoh avatar Nov 18 '23 02:11 kiikoh

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

shadcn avatar Feb 12 '24 23:02 shadcn