postgres node modules not found
I'm running into this error after I added an AuthButton component, i followed this tutorial to create the button https://www.youtube.com/watch?v=z2A9P1Zg1WM&t=485s
I'm using create t3 with nextauth and connected to neon postgres db with drizzle
AuthButton.server.tsx
AuthButton.client.tsx
im using the server component in my app
Jack Herrington
YouTube
Next-Auth v5 is Almost Here! Learn it Fast on the NextJS App Router...
Next-auth is an easy way to get started with authentication in your NextJS App Router application. Let's get it set up, and see how to secure routes, server actions, API routes and client and server API requests!
Code: https://github.com/jherr/next-auth-v5
š Upcoming NextJS course: https://pronextjs.dev
š Don't forget to subscribe to this chan...
1 Reply
My guess is that you're importing your server code into a client component, since postgress should not normally be loaded on the client. this part of the docs might be useful to you: https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#keeping-server-only-code-out-of-the-client-environment
Rendering: Composition Patterns | Next.js
Recommended patterns for using Server and Client Components.