gornostay25 / svelte-adapter-bun

A SvelteKit adapter for Bun
MIT License
534 stars 33 forks source link

TypeError server.websocket is not a function #38

Open peterlerche opened 1 year ago

peterlerche commented 1 year ago

Hi,

I am getting this error when running bun 1.0.9 together with svelte-adapter-bun 0.5.1. Any idea what is causing this fault?

bun run ./dist/index.js Fail: websocket handler error: 743 | function defaultAcceptWebsocket(request, upgrade) { 744 | return upgrade(request); 745 | } 746 | try { 747 | 748 | const handleWebsocket = server.websocket(); ^ TypeError: server.websocket is not a function. (In 'server.websocket()', 'server.websocket' is undefined) at handler_default (./dist/index.js:748:28) at ./dist/index.js:773:32

Listening on 0.0.0.0:3000

svelte.config.js adapter: adapter({ out: "dist", assets: true, envPrefix: "", development: false, precompress: { brotli: false, gzip: true, }, dynamic_origin: true, xff_depth: 1, }),

peterlerche commented 1 year ago

Just tested with the new version of bun 1.0.10 and the problem persists.