[RC] Cloudflare-vite unable to run dev server and build
I'm unable to run the dev server after upgrading to RC. The issue seems to be related to the
getSession in the root's beforeLoad.
https://github.com/khashvin/tss-cloudflare/blob/master/src/routes/root.tsx#L16
How can I fix this? Am I missing something?
repro: https://github.com/khashvin/tss-cloudflare
5 Replies
graceful-beige•3mo ago
you have to install
better-sqlite3cause locally, its use a sqlite filefascinating-indigoOP•3mo ago
same issue after installing it. it was working before this with D1 locally before I upgraded to RC
graceful-beige•3mo ago
get rid of bindings.ts
get env like this `import { env } from 'cloudflare:workers';``
fascinating-indigoOP•3mo ago
yep that was the issue.
Thanks! @stunaz
conscious-sapphire•4w ago
This worked for me too! To clarify, I needed to completely delete my old code which was loading the bindings since it was doing it at the module level, i.e. triggering the bad code when running
dev or deploy even though it wasn't in use anymore.
import { env } from 'cloudflare:workers'; Wish I had known about this sooner