Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with latest svelte-kit #89

Open
callmeberzerker opened this issue Jun 6, 2024 · 4 comments
Open

Doesn't work with latest svelte-kit #89

callmeberzerker opened this issue Jun 6, 2024 · 4 comments

Comments

@callmeberzerker
Copy link

callmeberzerker commented Jun 6, 2024

Describe the bug

Doesn't work with svelte-kit latest version. (see system info below)

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/spase/Private/chaos/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__sv_4ftxfejhmyxz2tcfri6oisklcy/node_modules/@sveltejs/kit/src/exports/node/index.js:107:9)
    at file:///Users/spase/Private/chaos/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]__sv_4ftxfejhmyxz2tcfri6oisklcy/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:497:27
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Reproduction

  1. clone https://github.com/callmeberzerker/mkcert-demo
  2. cd into the dir and run pnpm install
  3. run pnpm dev
  4. open https://localhost:5173/ in the browser and observe the stack trace
  5. as @konstantinblaesi mentioned below it can be fixed by adding the proxy bit -> but that is optional

System Info

Output of npx envinfo --system --npmPackages vite,vite-plugin-mkcert --binaries --browsers:

  System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 84.59 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.13.1 - ~/.nvm/versions/node/v20.13.1/bin/node
    npm: 10.5.2 - ~/.nvm/versions/node/v20.13.1/bin/npm
    pnpm: 9.2.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 125.0.6422.142
    Safari: 17.5
  npmPackages:
    vite: ^5.2.12 => 5.2.12 
    vite-plugin-mkcert: ^1.17.5 => 1.17.5 

Used package manager: pnpm

Logs

@liuweiGL
Copy link
Owner

liuweiGL commented Jun 6, 2024

Sorry, I didn't use svelte

@konstantinblaesi
Copy link

konstantinblaesi commented Jun 6, 2024

I use it in all my sveltekit projects and have no issues, newer node versions require setting proxy like this

export default defineConfig({
	server: { proxy: {} }
});

I think this broke somewhere between node 20.10 and 20.12. Also make sure you do not have a pnpm node version / node_modules mess (different versions mixing)

@callmeberzerker
Copy link
Author

I use it in all my sveltekit projects and have no issues, newer node versions require setting proxy like this

export default defineConfig({
	server: { proxy: {} }
});

I think this broke somewhere between node 20.10 and 20.12. Also make sure you do not have a pnpm node version / node_modules mess (different versions mixing)

I can confirm that this fixes it, thanks for that! It should work w/o the proxy bit so providing a repro momentarily...

@callmeberzerker
Copy link
Author

@liuweiGL reproduction attached to the original issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants