Can't deploy on vercel
Unanswered
Tan posted this in #help-forum
TanOP
Hello!!
i have a nextjs project that i would like to deploy on vercel but at generate static pages goes out of memory and do not deploy. Someone had the same or similar issue? I read on doc to use get static paths and tried to implement but i do not know if it is the real issue or if i did it right.. here is my repo
https://github.com/Aline89b/countries_flag
i have a nextjs project that i would like to deploy on vercel but at generate static pages goes out of memory and do not deploy. Someone had the same or similar issue? I read on doc to use get static paths and tried to implement but i do not know if it is the real issue or if i did it right.. here is my repo
https://github.com/Aline89b/countries_flag
17 Replies
Somali
Does
next build work properly?TanOP
Sometimes It does like in vercel , Building all the Pages and sometimes It Says that vs can t open trace file but build optimized Done
Chinese Egret
Try changing the timeout for SSG in next.config.js with the
staticPageGenerationTimeout field (time in ms)TanOP
nothing changed
Chinese Egret
Hmm, what error do you get?
TanOP
It goes out of Memory at generate static Pages
Chinese Egret
Try reducing the amount of country pages generated, may be that. Here is the vercel limits: https://vercel.com/docs/deployments/troubleshoot-a-build#build-container-resources
TanOP
i will try
thank you
I would like to call the data only once but i have the home page where i do a fetch with useeffect and all client actions and the detail page with only async functions. Is there a way to make only one function for fetching all data that i can use in both client and server page?
TanOP
Even with the half of the data gives the same err but on local It build also all the data
Chinese Egret
There are some ways to accomplish this:
1. Fetch data on the server and pass it to the client.
2. Refactor your code to fetch countries based on search, maybe with Server Actions.
1. Fetch data on the server and pass it to the client.
2. Refactor your code to fetch countries based on search, maybe with Server Actions.
@Tan Even with the half of the data gives the same err but on local It build also all the data
Chinese Egret
Hard to say, still think there is some kind of limit issue
TanOP
Could be a problem of Chrome? Because the error comes from there
TanOP
At the end i could deployed from vercel cli
I think there was some problems of authorization in Windows also
Thank u🙂