Using prefetch query in getserversideprops (next.js) fails when deploying on Vercel
Hi everyone, my code in running in local but when I deploy it on Vercel it fails
- I prefetch the async moralis code with react query in getserversideprops
- I retrieve it and console.log shows undefined when I deploy this code, but one more time everythings works fine locally when I run pnpm dev
what I'm doing wrong ? Is this even the right way to do this ?
I've settled my key in vercel see img joined, I've tried both with and without quotations marks

2 Replies
conscious-sapphire•3y ago
Do you get any kind of error-message if you check the network tab on your site deployed to vercel? Does it work if you build the project locally and run it (I mean build as building the project like you do in production, not running the dev-server)?
wise-whiteOP•3y ago
It resolved and I don't even know why it works now :/
I suspect maybe a variable environment issue or a rebuild needed on vercel to take the renewed env var to be used.
Thx for your support 🙂