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

TypeError server.websocket is not a function #38

Open
peterlerche opened this issue Nov 6, 2023 · 1 comment
Open

TypeError server.websocket is not a function #38

peterlerche opened this issue Nov 6, 2023 · 1 comment

Comments

@peterlerche
Copy link

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 peterlerche changed the title TypeErrorserver.websocket TypeError server.websocket Nov 6, 2023
@peterlerche peterlerche changed the title TypeError server.websocket TypeError server.websocket is not a function Nov 6, 2023
@peterlerche
Copy link
Author

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

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

1 participant