Giter Club home page Giter Club logo

Comments (3)

kolchurinvv avatar kolchurinvv commented on August 12, 2024 2

@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:
Screenshot 2023-05-30 at 17 05 55
Good news is that once vite builds it, bun ./build/index.js will actually start the server

from create-templates.

natefabian18 avatar natefabian18 commented on August 12, 2024

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.

from create-templates.

kolchurinvv avatar kolchurinvv commented on August 12, 2024

@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:

  1. 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.

  2. use https://github.com/gornostay25/svelte-adapter-bun adapter, which seems to have some more traction, however it still uses esbuild instead of bun.build()

from create-templates.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.