[Support Guide] How can I optimize my Netlify build time?

Actually was @brianjychan who asked that one, but autocorrect probably got you on the “br” front. :wink: Thanks, though.


@brianjychan, I @mentioned the wrong person and wanted to be sure you saw my reply to you above.

(Thanks for pointing out my typo, @brycewray.) :+1:


@luke thanks for the pointer, with that and Create build plugins I figured out how to do it!

On Build Plugins, I think it would help to move the yellow “Current Build Image required” warning to the top of the page; I didn’t see it for awhile since I was doing file-based configuration.

If you have a moment, I have two unresolved problems resulting from me caching my React App dependencies instead of a fresh npm install of node_modules. These questions might be out of scope, but I wonder if you might know anything about them:

I saw that the create-react-app command of react-scripts build didn’t work after cache restore (using utils.cache.restore('node_modules'))

Later I found it was because node_modules/.bin/ was not cached. This caused node_modules/.bin/react-scripts to be missing.

I resolved this by manually caching the node_modules/.bin; is this an antipattern?

After the above, I found that react-scripts build would now run, but threw the below error.

It appears to be unable to resolve node_modules/react-scripts/scripts/build.js/ when running:

Do you know why this might be?

I ended up deciding to use the executable at
instead, and not caching node_modules/.bin.

For more context (and if anyone else sees this), my plugin code is here:

Let me know if you see anything amiss at a glance, I doubt I have done this in the best way

Thanks for your time!

hey @koudai0024, as mentioned above, you can actually change this yourself now:

Hi @luke this is my first time write post here. Thank you Netlify for providing very great support through this forum.

I don’t know wether my question will fit into this thread or not. But here is my question, If we use Netlify CLI and build our project locally then deploy it using Netlify CLI as well. Is that count in build minutes?

hi there, you might find this interesting:

1 Like

Hello there! Could you help us by increasing our build time from 15 to 30 minutes, please?
akasha.ethereum.world (brave-prod-ewa-uwu)
Thank you very much! :pray:t4:

hi there, we have upgraded your build timeout to 30 mins. enjoy!

1 Like

@perry Thank you! Could you please confirm it’s all fine though? We have just tested and it’s still breaking around 17min.

@perry It’s working now, don’t worry :pray:t4:

1 Like

Thank you for confirming, @anquadros !

1 Like

Hey @hillary and @perry! It’s quite unstable at the moment :sweat: A few times we were able to build with >20min, but MOST TIMES it fails between 15-20min. Could you please confirm if the time was really increased to 30min? And if so, any thoughts on what else could be happening?

6:27:24 PM: Execution timed out after 18m51.541624894s
6:27:24 PM: Error running command: Command did not finish within the time limit
6:27:24 PM: Failing build: Failed to build site

hi @anquadros, can you confirm this is fixed or still an issue? i can take another look if your builds are still timing out.

Hi Perry, would you be able to increase our build time as well at pilotcity?

Hey @perry! I’m sorry for the late update, I was on an extended holiday. It’s fine now, we have opened a support ticket and they fixed the issue. Thank you! :pray:t4:

1 Like

Hello again @perry :wave:t4:Could you now help us by increasing the building time of “storybook-awf”

Thank you in advance!

hi there, how long would you like the build time to be? i can look in to it!

@perry Sorry for the incomplete request. I believe 20min should do the trick for now. Not sure though because we don’t have a benchmark for this site and atm it seems capped at 1min.

hi again, i see that the build time for that site should already be 30 minutes.

could you link us to a failing deploy so we can see the error message please? maybe it is something else.

Just to make sure we’re in the same page: we’re both talking about “storybook-awf”, correct?

This is the error we’re getting

7:27:28 PM: Failed during stage ‘building site’: Command did not finish within the time limit
7:27:28 PM: Finished processing build request in 57.64406851s