Open CoreBlender opened 1 year ago
@CoreBlender, it's not there. bun doesn't fully support svelte-kit, so what you have to do is run the package json scripts that are going to utilise Vite. so to start a dev server run bun run [script_name]
(for now). list of scripts in a brand new template:
Good news is that once vite builds it, bun ./build/index.js
will actually start the server
Tried looking into using bun with sveltekit ran into an error about Server not being defined.
bun run ./build/index.js
Listening on 0.0.0.0:3000
708 |
709 | function defaultAcceptWebsocket(request, upgrade) {
710 | return upgrade(request);
711 | }
712 |
713 | if(server.options.hooks.handleWebsocket) {
^
TypeError: undefined is not an object (evaluating 'server.options.hooks')
at /home/nate/Documents/Git/LeaderBoard/build/index.js:713:3
Happy to provide whatever info I can to assist.
Worth noting that running bun run ./node_modules/.bin/vite dev
does appear to work correctly on a surface level. Not sure what its doing under the hood.
@natefabian18 - i'm guessing you're using the adapter mentioned in the community adapters post. i've had the same issue. there are two options:
go into the build/index.js
and edit line 713 to be if (server?.options?.hooks?.handleWebsocket)
- less than ideal, since this file is being regenerated on every build.
I am a newbie
when I run -> bun run main.ts