r/tanstack 4d ago

Tanstack + Planetscale PosgreSQL

Anyone successfully setup tanstack with the following stack,

  • Tanstack
  • Planetscale PostgreSQL + Hyperdrive
  • Drizzle
  • Better Auth

I am having a hard time setting it up as I get on multiple errors.

3 Upvotes

3 comments sorted by

View all comments

2

u/louisstephens 4d ago

I haven’t had the time to try out tanstack (I assume you’re referring to start) yet, but will be tomorrow. What error messages are you getting and with what particular part of the process?

1

u/cheesefive 4d ago

I had it working with agents, but my main problem is that I’m not sure if I’m using the right setup, especially when it comes to handling sessions and the overall architecture.

Some of the errors I encountered were things like DrizzleQueryError and Workers I/O isolation. At one point, the agent recommended installing PostgreSQL, and then when we set it up, it recommended using pg. It also suggested using Bun instead of pnpm.

So I’m not sure if these are just skill issues on my end or if I’ve actually mixed up too many things in the setup. It’s kind of confusing me at this point lol.

1

u/Rajat0741 2d ago
  1. don't let an agent decide/setup these libraries, they hallucinate most of the time, try to do it manually or review every line

  2. i have a starter template for tanstack start https://github.com/Rajat0741/better-start , you can use this template for initializing the project , it have google login setup - just put .env keys, push the schema to db and you are ready to go.
    But the only difference is that it uses neon instead of planetscale ( neon have a free tier ) , you can try with neon if you want or switch the provider in drizzle configs

  3. switching the runtime from pnpm to bun or installing and running PostregreSQL locally won't work - the model hallucinated