Sveltekit errors on run immediately after initing new project. Suggestions on cause?
The original msg:
SvelteKitError: Not found: /json/version
at resolve (eval at instantiateModule (file:///home/[path]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52963:24), <anonymous>:541:13)
at resolve (eval at instantiateModule (file:///home/[path]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52963:24), <anonymous>:341:5)
at #options.hooks.handle (eval at instantiateModule (file:///home/[path]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52963:24), <anonymous>:80:56)
at Module.respond (eval at instantiateModule (file:///home/[path]/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52963:24), <anonymous>:338:40) {
status: 404,
text: 'Not Found'
}
I thought maybe it was complaining about /proj paths so I created them in there and then vite complained
The request url "/home/[path]/json/list" is outside of Vite serving allow list.
So I put them in proj/src and received a bit different error (progress?)
SvelteKitError: Not found: /json/version
at resolve (/home/[path]/node_modules/@sveltejs/kit/src/runtime/server/respond.js:530:13)
at resolve (/home/[path]/node_modules/@sveltejs/kit/src/runtime/server/respond.js:330:5)
at Object.handle (/home/[path]/src/hooks.server.ts:77:9)
at Module.respond (/home/[path]/node_modules/@sveltejs/kit/src/runtime/server/respond.js:327:40) {
status: 404,
text: 'Not Found'
}
On the off chance that something was old, I did npm update with the same result.
This originally started when I tried to install/setup a sveltekit prefab with tailwind and lucia. Then I went to another distro (WSL) without work projects on it, used npx sv create
with the same result.
Any idea what's going on? 2 different distros, 2 different setups, same error, surviving many different installs, delete installs, etc.
[edit] To be clear, the project runs fine. But these errors spam the console every half to 3 seconds for eternity.
[edit 2] Weird . . . i uninstalled degit and the directories changed to /messages and /my-purchases and they don't spam.
I looked at npm list -g --depth=1
which shows nothing but default npm global installs. I have no idea where this is coming from, but it really seems to be "something else" gettin in the way.
FIX
Turns out that I had a rogue tab related to a work project. Normally, stopping the dev server closes all related tabs. . . except maybe it didn't, and that remaining tab kept polling for the server. So when I started a new server for a different proj, it was polling on the same port and getting 404s back. Closing all localhost related windows and restarting the browser seems to have fixed it.