Support Forums

Gatsby local build succeeds but fails on Netlify

Connected to the same backend, gatsby build succeeds on my local machine, while it keeps failing on Netlify. The last error I got was,

6:34:37 PM: error UNHANDLED REJECTION ENOENT: no such file or directory, open '/opt/build/repo/public/static/36a98d47e4abeacaa881778db577dde5/e8483/ScreenShot2021-01-23at3.32.15PM.png'
6:34:37 PM: 
6:34:37 PM: 
6:34:37 PM:   Error: ENOENT: no such file or directory, open '/opt/build/repo/public/static/  36a98d47e4abeacaa881778db577dde5/e8483/ScreenShot2021-01-23at3.32.15PM.png'

What site is this regarding?

https://shopthearea.net/ it is a gatsby site with a Drupal back end.

The error is probably caused because your builds are timing out at 30 min. I’ve bumped the time limit for you to 45 mins. Let’s know if it works.

Hi! I have tried the same set of configurations on local and it builds successfully. I don’t understand what is the difference in configuration that causes gatsby build to fail ONLY on Netlify. PLEASE HELP!

Hey there, @Claire_Aillet :wave:

Do you have a public repo that we can look at for this? Additionally, can you share you most recent build log?



We were able to reduce build time to a good extent by upgrading to Gatsby V3. However, since our Drupal backend has grown in size, the build is still taking a good amount of time and often results to ‘Build exceeded maximum allowed runtime’ when we try to build after adding more new products to Drupal.

Could the allowed build time for all my instances be increased?

Hi @Claire_Aillet,

By all the instances, you mean what exactly? All deploys or all websites?

Hi @hrishikesh, thank you for getting back on this quickly.

This is Somedutta Ghosh, I am managing the site on behalf of Claire who is the owner.

I need to test on stage before I can deploy on live. Right now I am testing on stage which is constantly failing during build. Can you increase the build time for stage and live sites on my account?

Sure, what’s the API ID or Netlify subdomain of those websites?

Stage: https://sta-stage.netlify.app
Live: https://www.shopthearea.net

The timeout for both of those websites is now 60 mins.

Thank you so much @hrishikesh . Even though we need to figure out why our build takes so long, for now i think this will help a lot!

Is there a time limit till when we have this build time and is it available on both stage and live now?

No, there’s no time limit as such. You keep it till you delete the websites and yes, it’s done for both the websites.

@hrishikesh thank you so so much!

1 Like