[Bug?]: Cloudflare adapter fails to inject d1 databases in local environment #1130
Closed
2 tasks done
Labels
bug
Something isn't working
Duplicates
Latest version
Current behavior 😯
D1 database defined in
vite.config.js
does NOT get injected intoenv
when callingcreateServerData$
Expected behavior 🤔
D1 database defined in
vite.config.js
should get injected intoenv
when callingcreateServerData$
Steps to reproduce 🕹
Steps:
solid-start-cloudflare-pages
and add d1Databases adapter by following the deploy-a-solid-site guidesrc/routes/index.jsx
to fetch data from d1 databasesI omitted the sql codes to generate the schema. The above code will error out upon calling
env.my_database.prepare
sinceenv.my_database
is undefined.I also want to mention that the code works on production environment which lead me to believe that the issue has something to do with the adapter.
Thanks!
Context 🔦
I would like to use SolidStart with Cloudflare Pages and would like to use the setup in my local environment to speed up development.
Your environment 🌎
The text was updated successfully, but these errors were encountered: