-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[bug]: Module not found: Error: Can't resolve '@/components/ui ....... #3705
Comments
|
Hi you can resolve it just by replacing your path is here ---> "@/": ["./"], , replace with this "@/": ["./src/"], in your tsconfig.ts file |
But the components folder is not inside of the src folder |
And I already tried setting a definite path in the config to the folder. It did not work on reactscripts start. |
um when you install can you write the step how you install the component |
Just with the normal component install. It installs it directly to components/ui at root |
hello, very interesting that this happend to Quitscher two hours ago, since this same issue arrived for me out of nowhere 2 hours ago aswell, and im trying to fix it. |
hello i fixed it by deleting a tsconfig file but that also isn't optimal |
npx shadcn-ui@latest add --all |
and you are updated config file or not ..? |
Ofcourse but it is still correct |
noo... please read beforehand. |
You can Please Share a screenshot |
and your file structure screenshot |
try this ==> @/app/components/ui/button |
it is just a runtime error when doing "start": "react-scripts start", |
it is not inside of /app/ |
It does not matter (at least it should not) what the file structure is, when my imports are correct. As I stated earlier, it seems to be a problem with react-scripts! This topic needs some experts in that direction. |
I encountered similar issue.
and defined aliases in
this placed shadcn components at the
and adjusted
this placed shadcn components inside |
I followed this manual (https://ui.shadcn.com/docs/installation/vite) and it's working fine. However, it's not working with a project bootstrapped with create-react-app, but it's working fine with Vite installation. |
Thats the point. I just want the create-react-app. No Vite or Next.js. |
Describe the bug
When using create react app and compiling / starting the react-scripts start command, you get
Module not found: Error: Can't resolve '@/components/ui .......
Also found here:
#1101 (comment)
Affected component/components
all
How to reproduce
create a react app by create react app (i added typescript)
add shadcn
create a component
run start script
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting
The text was updated successfully, but these errors were encountered: