Closed YusufFidan closed 3 months ago
Please provide a minimal reproduction, and not just the contents of your svelte.config.js
.
But this is exactly what happened:
$ nvm use 20
Now using node v20.15.1 (npm v10.7.0)
$ npm run dev
After this the project seems to start properly, as in reproduction. The browser says this ´´´ TypeError: Could not convert argument of type symbol to string. at webidl.converters.DOMString (node:internal/deps/undici/undici:1977:15) at webidl.converters.ByteString (node:internal/deps/undici/undici:1982:35) at Object.record<ByteString, ByteString> (node:internal/deps/undici/undici:1894:30) at webidl.converters.HeadersInit (node:internal/deps/undici/undici:3424:67) at Object.RequestInit (node:internal/deps/undici/undici:1951:21) at new Request (node:internal/deps/undici/undici:4835:34) at getRequest (file:///Users/yfidan/projects/kronos/node_modules/@sveltejs/kit/src/exports/node/index.js:107:9) at file:///Users/yfidan/projects/kronos/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:497:27
I found out that using node > 20.11.1 causes the error I described.
$ nvm use 20.11.1 Now using node v20.15.1 (npm v10.7.0) $ npm run dev
Please provide a link to a repository which reproduces this bug. We can't know what's going on just from looking at two copy-pasted files.
I'm really sorry for the confusion. The repository is a private one, but: I found out, that the problem is caused by basicSsl(). I'll try to figure out why, but this is no issue with svelte. Thanks again.
I have the same issue and it happens both with mkcert and with basic-ssl @YusufFidan what was your solution?
I followed the answer from Big_Boulard to the post: https://stackoverflow.com/questions/73205096/run-sveltekit-dev-with-https
I'm using now mkcert. In vite.config.ts:
...
plugins: [sveltekit()],
server: {
https: {
key: fs.readFileSync(`${__dirname}/cert/key.pem`),
cert: fs.readFileSync(`${__dirname}/cert/cert.pem`)
},
proxy: {}
},
...
In package.json
"dev": "vite dev --host hostname.ddev.site --port 8443",
´´´
I removed basicssl() completete.
I came to the same solution :)
proxy: { }
made it work in the end. I guess it would now also work with basic-ssl but I didnt try again
I got the same issue, with both basicSsl
and with backloop.dev
(it's new, and I totally dig it for great DX). I confirm adding proxy: {}
fixes it with backloop.dev
.
I'm not going back to basicSsl
to try the fix, but basicSsl
has the same underlying mechanics of providing server object certs, so proxy: {}
should fix it too.
Describe the bug
I'm using svelte for a while. After Update to Node 20.15.1 I got following error:
This is my svelte.config.js
Reproduction
nvm use 20 (uses latest 20.15.1) I'm getting the described error. After some tests the Problem causes with node >= 20.12.0
The project seems running properly
Logs
No response
System Info
Severity
annoyance