ui: Cant install on a Js project
i keep getting this error everytime i try to install on my non-ts project
Failed to load tsconfig.json. Couldn't find tsconfig.json
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 5
- Comments: 18 (3 by maintainers)
Found the issue You need to add a jsconfig.json to the file to mention the alias paths if you have a need to support any
For eg.
The error message needs to be updated to specify missing jsconfig.js file instead of tsconfig.json file when tsx is false in components.json file
I ran into this issue as well with a non-TS project. I manually added a
tsconfig.jsonfile at the root of the project and inserted the block of code provided in step 4 of the manual instructions. Then I ran the init commandnpx shadcn-ui@latest initand stepped through the questions - specifying ‘no’ to the “Would you like to use TypeScript (recommended)?” questions. When I installed theBadgecomponent, it added a.jsxfile intocomponents/uidir.Hello @Namnika @prashantchhonker ,i assume you are using react js. I have been using shadcn at my own js react vite project too, you can use my starter repo if you like. https://github.com/spiritoftime/shadcn-reactjs-starter
Thanks everyone, I now fully use typescript lol.
I am facing the same issue. I am following the installation instructions to the dot. Which means running the following commands.
Thanks 😃
@spiritoftime Thank you so much for sharing the repo link! 😃 And I tried to do it with customization of React + Vite + shandcn which worked well.
Thanks All of the way!