Next.js Discord

Discord Forum

neon db not fetching in production but works in development

Unanswered
Elite posted this in #help-forum
Open in Discord
neon db not fetching in production but works in development. Our ENV variables are set, we even installed the Neon extension for vercel. Not sure why

8 Replies

Here is a simple way to do that
export const dynamic = ‘force-dynamic’
The page is static by default
Wait so why are they static by default
I’m using the [slug] page here
do i need to do that to all my pages?
@Ray Make sure your pages are dynamic and not pre-rendered
Hey sorry for the pings. Just wondering where I need to put this (which files) and why?