Build stuck on "Creating an optimized production build..."
Unanswered
Maheśvara posted this in #help-forum
I'm at my wit's end here.
An app which previously built just fine now no longer builds when I run
Worst yet, it builds on other PCs but not on mine.
The version of next is currently on
When this error had started occurring was also while I was in the middle of developing the app, it was working fine until it just wasn't. My local dev server works just fine btw, it's just that it can't build.
I've tried resetting my environment (I use WSL), doing a fresh install of everything, and the error persists.
Is there any advice on how to proceed?
An app which previously built just fine now no longer builds when I run
next build, it just stalls on the Creating an optimized production build... step.Worst yet, it builds on other PCs but not on mine.
The version of next is currently on
14.0.3 but it was happening even in 13.5.6.When this error had started occurring was also while I was in the middle of developing the app, it was working fine until it just wasn't. My local dev server works just fine btw, it's just that it can't build.
I've tried resetting my environment (I use WSL), doing a fresh install of everything, and the error persists.
Is there any advice on how to proceed?
26 Replies
Any chance you're running out of memory? WSL defaults to a limit of 50% of the system memory IIRC
@James Any chance you're running out of memory? WSL defaults to a limit of 50% of the system memory IIRC
Running htop alongside it, this doesn't seem to be the case
I have 32gb of memory, WSL get's 16
And only uses like 5GB when I run the command
When I first run the command, all my CPU cores are in use but then suddenly they stop being used
No idea why, but it seems like the command just stops, it's not like it's infinitely processing something as the CPU usage isn't high, it just goes from 50-80% usage to 0-4% which basically isn't anything
American
@Maheśvara did you solve this? Seeing the same error now, haven't seen it before
@American <@173526934888644609> did you solve this? Seeing the same error now, haven't seen it before
No I haven't. I'm completely at a lost at what causes it since it seems like other repos are able to be built without issue. I've just decided to leave it up to my CI/CD pipeline to do the build testing for me right now, although that's not optimal.
It also doesn't seem to be an error from what I can tell since I listened to unhanlded errors in the next config file and nothing unexpected shows up.
Kinda just have to deal with it rn and move on since I have a prod system with users to deal with
It also seems like a bust posting on this discord as the error just seems to be ignored, other threads weren't that helpful either.
American
@Maheśvara are you using docker desktop? if so, what version?
@American <@173526934888644609> are you using docker desktop? if so, what version?
No, not using docker for this project rn
American
Oh, I see
I think my problems started today when I upgraded, seeing other builds freeze too
might be different issues we have then
Hmmmm, my coworker was integrating docker in the project recently
I'm not too sure if it's in it yet, but maybe it is related
But for now, I think it may be a different issue
When I had started getting this issue, it was before they started working on that
I also got it on Next 13.5.6
Doesn't seem to be a version issue there
American
I'm on 14.0.3 and it's worked up until today for me
Seems like I can build in my ci though
Well, for me, like I described above, I was mid dev when it just stopped
Like 1 minute it's building fine, the next minute I get this error where it hangs