Error in signing up using cloudflare d1 database and drizzle orm on nextjs15
I've been trying to make the signup logic work, ive watch so 2 tutorials relating to the same techstack as mine and wrote same code as them but mine doesn't work at all gave same errors on all iterations.
this error occurs when i submit the sign-up form, i have nothing in the code defined as "fullSchema" :
and this error appears in the browser console:
versions:
"better-auth": "^1.0.22"
"next": "15.1.0"
"drizzle-orm": "^0.38.2"
"wrangler": "^3.98.0"
any help is appreciated!
8 Replies
im using the schema generated by the command mentioned in the docs i.e.
npx @better-auth/cli generate
@/lib/auth.ts
@/lib/auth-client.ts
the sign-up method im using:
pass the schema on the drizzle adapter
still doesnt work, just the error message is new
i know im making some silly mistake somewhere but this is such a pain
this is saying db.select isn't a function
are you sure your drizzle
db
intance is properly initalized?this is what i currently have in the drizzle instance
i couldnt find any resource regarding it so took help from claude and came up with this
cf setup requires a bit of work around. If you're just trying out stuff don't use CF try something else
but if you need to use CF for some specefic reason check out this example as a starting point https://github.com/Bekacru/better-auth-nextjs-cf-d1-example
GitHub
GitHub - Bekacru/better-auth-nextjs-cf-d1-example
Contribute to Bekacru/better-auth-nextjs-cf-d1-example development by creating an account on GitHub.
thanks, will look into it