The only way I can avoid Root undefined errors is to run npx shadcn-svelte init; restarting my server brings the errors back #2398
Unanswered
baronyoung
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I can sometimes complete quite a bit of development work without ever restarting my dev web server. Yesterday I restarted it and got the following error: "Error when evaluating SSR module /src/routes/+layout.svelte: Cannot read properties of undefined (reading 'Root'). When I've run into issues before with shadcn-svelte I've re-run the init and it's fixed it so I tried that again. It did fix it. However, any time I restart my web server it comes back.
I'm using the most recent versions of shadcn-svelte, svelte/sveltekit, and vite (I just run the sveltekit install as specifiied in the shadcn-svelte installation instructions ). Here's the troubleshooting I've tried so far:
I'm at a loss. It seems that nothing of importance changes but the error comes back. Any help would be greatly appreicated. Until this is resolved I have to run shadcn-svelte init every time I restart my server (luckily this isn't that often).
Beta Was this translation helpful? Give feedback.
All reactions