#`new Database()` crashes Bun

1 messages · Page 1 of 1 (latest)

rustic tundra
#

This code causes Bun to throw this error:

import { Database } from 'bun:sqlite'
new Database()
#

Any ideas on how I might fix this? Thanks!

#

doesn't occur on my cloud server (arm64), does on my physical server (x86_64)

hollow vale
#

install the -baseline version from github releases

#

your cpu is too old

rustic tundra
#

@hollow vale i installed with npm i -g bun, is that the same as baseline?

hollow vale
#

no thats the main build

rustic tundra
#

ok, do i need to manually install -baseline by downloading/extracting the zip?

hollow vale
#

all the special builds like baseline, debug, canary, etc are only available on gh releases yes

rustic tundra
#

ok thanks

hollow vale
#

with the exception of canary being able to be upgraded to with bun upgrade --canary but you still cant directly install it

rustic tundra
#

thanks, i replaced /usr/bin/bun with the bun from bun-linux-x64-baseline.zip

#

still getting the same error, i'd expect sqlite to work on a 13 year old cpu, is there a way to make it work?

hollow vale
#

13 years is very old... -baseline builds are already the "fix" for older cpus

rustic tundra
#

it is old but everything else using sqlite3 works, what's specific to bun that doesn't work?

hollow vale
#

part of bun's speed comes from making use of advanced modern cpu features for performance boosts

#

so your cpu doesnt support one or more of them, like AVX2 or something (but baseline already removes AVX2 requirement so its something even older)

rustic tundra
#

i see, i'll try developing on wsl2 instead of remote ssh

#

thanks

rustic tundra
#

how do i mark this as solved?