i am using shadcn with simple react app with typescript installed but i'm getting this error
module not found: Error: Can't resolve '@/components/ui/accordion' in '/home/vinayak/Desktop/sadcn/src'
i have installed it using shadcn cli and kept typescript component option as no so i get jsx components only every time.
here is my tsconfig file ::
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/": ["./*"]
}
}
}
Here is my project tree
- .gitignore
- README.md
- app
- globals.css
- components
- ui
- accordion.jsx
- components.json
- lib
- utils.js
- package-lock.json
- package.json
- public
- favicon.ico
- index.html
- logo192.png
- logo512.png
- manifest.json
- robots.txt
- src
- App.css
- App.js
- App.test.js
- index.css
- index.js
- logo.svg
- reportWebVitals.js
- setupTests.js
- tailwind.config.js
- tsconfig.json
How to fir it ??
I resolved this issue. Put this on your terminal :
npm install shadcn-ui@latestnpm install npx shadcn-ui@latest init