BA
Better Auth•6d ago
Duki

[Better Auth]: Couldn't read your auth config. Error: Cannot find module '$app/paths'

Has anyone else had this issue (see title) when running the npx @better-auth/cli generate cli command on SvelteKit? I can't figure out how to fix this issue.
Solution:
Duki, as mentioned by @KiNFiSH you probably need to remove any import that is called using sveltekit conventions and the run it. that's what I had to do
Jump to solution
3 Replies
KiNFiSH
KiNFiSH•6d ago
yeah currently we dont support svelte $ file path convention , can you please try using relative path
Solution
chumpo
chumpo•6d ago
Duki, as mentioned by @KiNFiSH you probably need to remove any import that is called using sveltekit conventions and the run it. that's what I had to do
Duki
DukiOP•5d ago
Aah I see, that's a bummer 🙈 Got lots of imports to fix then. But thanks for the workaround solution! Are there any plans in including this? Because right now, when I fix my imports I even have to fix the imports in other imported files, just because an other function in that file has an other dependency from yet an other file in $lib or $app. Leading to quite a bit of a rat's tail.

Did you find this page helpful?