Replies: 7 comments 4 replies
-
You have to pass a baseUrl too.
|
Beta Was this translation helpful? Give feedback.
-
any solution? when i replace the "@" imports with direct imports like "../" it works. any way to resolve it, our tsconfig is the same |
Beta Was this translation helpful? Give feedback.
-
I encountered the same error. When I tried to install a package from shadcn, it placed it in the root instead of the src directory. Have tried tweaking the jsconfig.json file in all the ways I could think of but it's not working: { |
Beta Was this translation helpful? Give feedback.
-
@gabriansa @AmaraFray @mandorakannu @pinpos375 @toolmantim Did you find out the solution,I am also facing the same problem |
Beta Was this translation helpful? Give feedback.
-
It will depend on what you are using. I am using typescript but I have added extension .jsx or .js file. I renamed extension to .tsx nd .ts. Worked like charm. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue since yesterday on deploiement flow , and it's happen on some import, not for the all imports elements on project. I don't understand why and what the hell :/
"baseUrl": "./",
"paths": {
"@/components/*": ["src/components/*"],
"@/ui/*": ["src/components/ui/*"],
"@/layout/*": ["src/components/layout/*"],
"@/styles/*": ["src/styles/*"] Errors are like : |
Beta Was this translation helpful? Give feedback.
-
In your Next App, If you see two files "tsconfig.json" and "jscofig.json" then in both of files check is this code present:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I get the following error of module not found in my page.jsx:
Module not found: Can't resolve '@/components/ui/button'
.I am importing with
import { Button } from "@/components/ui/button";
Standard shadcn/ui button.My
jsconfig.json
is as follows:So it should allow for
@
type imports. I can't figure out why I keep getting this error. I tried to create a new project from scratch and still encounter it.Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions