SvelteKit-Typescript Template errors

I’m hoping I can use this template to teach a course this fall, but when I try to use the template and click run, I get a stream of errors in the console. It appears to be using a websocket connection on port 3000. Has anyone else used this template successfully? Any hints?


The deferred DOM Node could not be resolved to a valid node.
VM140 devtools.js:86 [vite] connecting...
VM171 client:188 WebSocket connection to 'wss://' failed: 
(anonymous) @ VM171 client:188
VM140 devtools.js:86 [vite] server connection lost. polling for restart...
VM200 devtools.js:86 [vite] connecting...
VM234 client:188 WebSocket connection to 'wss://' failed: 
(anonymous) @ VM234 client:188
VM200 devtools.js:86 [vite] server connection lost. polling for restart...
VM265 devtools.js:86 [vite] connecting...
VM299 client:188 WebSocket connection to 'wss://' failed: 
(anonymous) @ VM299 client:188
VM265 devtools.js:86 [vite] server connection lost. polling for restart...
VM330 devtools.js:86 [vite] connecting...
VM365 client:188 WebSocket connection to 'wss://' failed: 
(anonymous) @ VM365 client:188
VM330 devtools.js:86 [vite] server connection lost. polling for restart...
VM396 devtools.js:86 [vite] connecting...

I forked template it’s working fine for me.
You can run mine Click here

Can you share link to your forked project where you are getting error?

1 Like

Hmm. I couldn’t find a way to share my Teams repl outside my Team. I created a public repl that has the same behavior:


Strange. Yours is behaving exactly as mine is. Maybe it’s the browser?

I’m on Google Chrome: 103.0.5060.53 (Official Build) (x86_64)

What browser are you using?

Is there a rule against posting absolute URLs? I’ve attempted to reply twice now with a URL to my public repl and it’s been blocked each time!

It is allowed. You can’t post due to anti spam filters. Read some more posts and topics and those restrictions will be lifted

I am using Chrome too, may be try incognito window :sweat_smile:

As for adding URL you need to level up in this forum as @Ethan mentioned

1 Like

Hmm, incognito did not help. I’m curious are you able to add a to-do?

Do you see any error messages in the console?


Yes, I am perfectly able to add todos and even mark them done!!

Here I have attached few snap have a look.

And this one is consol view

That’s mighty peculiar. When I go to your repl I just get reloads every few seconds.

When I go to the “TODOS” tab I see:

Any hints about how to determine what’s wrong? For what it’s worth, I see the same behavior on Firefox and Safari.

1 Like

Hello, I checked in my phone without logging in replit account and I got same errors as you.(for user who forked in own accounts path variable not required for public it is required).

I did debugging and found that it was just a path error.

As the error said it was unable to find routes folder and index file.

I added path in tsconfig file.

And the error was gone kindly do check and reply.

Here’s snap where I corrected code

You can check original code in templates by clicking on show files and visiting tsconfig.json and you will find that path missing here.

Let me know if problem is solved :slightly_smiling_face:

Strange. That has not fixed it for me. I checked your repl, and I added the “*.routes” path to my repl, but the behavior is unchanged. Thanks for the effort! Most puzzling.


May be still some browser glitch I see that you ran yours, have you tried running mine??

Here is mine I ran it without logging my account. (1)

Check in other devices like phone, tab, etc.

Give try at my link.

Delete and refork template.

Share replit link for resolving coding errors :sweat_smile:

Hope it works out.!

Note the program takes 10 seconds after running projects to work, by clicking on todos waiting for few sec will solve this issue.

Darn. I don’t see your version any more:

I’ll keep poking around. Thanks for your help.

Try running kill 1 in the shell and then restart browser, and possibly your device.
I remember having this error happen to me when working with vite and typescript, but for some unexplainable and rare reason, it would continuously lose websocket connection.

After rebooting my browser, repl, and device, things seemed to work fine.

Sorry I deleted the repl due to inactivity. Hope you got the solution :cry:

the best option was to make a fresh new node app, and then add sveltekit