Next.js Discord

Discord Forum

Unable to create build in production mode

Unanswered
Macao paper wasp posted this in #help-forum
Open in Discord
Macao paper waspOP
it shows this Creating an optimized production build ... approximately 12 hours please help to solve this, my git hub project link is this https://github.com/zeyakarim/school_management_app.git

5 Replies

Macao paper waspOP
Please help to solve me, I have been doing last 3 days
Macao paper waspOP
I am waiting for your response
Roseate Spoonbill
It's hard to tell why this happens wihtout any details. Please, share the following info:
- Does this happen on every build?
- Does this happen on local build as well?
- Do you use any automation for the page build/deployment (vercel, jenkins, other things)? If so, what's the config/commands you use?

We don't know anything about your code/data so it's hard to tell more. Note, that someone requested more info from you above, so please, share as much as you can about your setup.
Macao paper waspOP
local build perfectally fine, but in production build on ec2 instance it stuck
Roseate Spoonbill
How large is the instance? Can it be due to lack of memory/slow cpu/slow disk? You can check node resource usage on the instance to see if any of those are a problem. Also, make sure to note if this happens each build, or did it happened only once. If only once, I'd recommend restarting the build (preferrably after removeing .next folder and/or reinstalling fresh node_modules)