Error while building "Could not resolve "./badge.svelte" from "src/lib/components/ui/badge/index.ts"
I am working on a SvelteKit project with shadcn-svelte and on the components/ui directory all the component exports from index.ts files has this error
and the Svelte component is right there. It works locally and build locally but when pushed to production this error shows up on the build and won't deploy the app.
It happened on Cloudflare and I tried deploying to Vercel and the same thing happened.
I also noticed that the shadcn-svelte library changed their component names form Uppercase to Lowercase and this might cause the error but I pushed to production after changing the names.
Here is my svelte.config.js
vite.config.json
And tsconfig.json
1 Reply
Solved by deleting the ui folder pushing code to error out and creating the ui folder again and installing the components