Next.js Discord

Discord Forum

collecting data for dynamic route fails in app router production (github actions build)

Unanswered
Galician Shepherd Dog posted this in #help-forum
Open in Discord
Galician Shepherd DogOP
I have a dynamic route for my dashboard route which is [id]/page.tsx then in side i receive the id and fetch the database
this is rendered dynamically but when i push to github in my github action workflow when it tries to build it it says failed to collect page data for /dashboard/[id]
what is the problem then ?

9 Replies

@joulev there should be an error accompanying that message. what is the error?
Galician Shepherd DogOP
how about earlier messages? there must be an error somewhere
@joulev how about earlier messages? there must be an error somewhere
Galician Shepherd DogOP
thank you for your answer
yeah that's the bug, try to fix it
looks like you didn't put a valid environment variable for libsql
Galician Shepherd DogOP
but the thing is
it works locally
even i build locally works
it is deployed in vercel
is that bug still valid ?
@Galician Shepherd Dog is that bug still valid ?
how do i know? now you have the error you need to fix it, i don't know your code nor why the error happened so i can't know.

to build in github actions you need to add environment variables to the github actions workflow as well: https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions