Comments (3)
@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
from create-templates.
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.
@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 beif (server?.options?.hooks?.handleWebsocket)
- less than ideal, since this file is being regenerated on every build. -
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)
- Update React template to use Typescript HOT 1
- Is there a good monorepo template? HOT 1
- Update React Template to have build script
- React template dev server doesn't support hot reload
- create next app error
- create react: error: could not determine executable to run for package create-react
- Static Site Template
- Unable to run the command "bun create react-ssr" successfully.
- bunx create-hono hangs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-templates.