Gatsby Build Error 95313

Lately I have been working with a course Gatsby Tutorial and Projects Course by John Smiga. I jumped in and started following the backroads tutorial. This was working well in develop mode but when the time comes to deploy an optimized build on netlify I get errors.

So far I've deployed only two sites on netlify that were created with Gatsby. Both built without errors and are deployed to Netlify using Github.

Looking at the error message, I feel like I am reading a foreign language :-)

I first looked up the error at [[]=object&args[]=]([]=object&args[]=) and found the following

Not very helpful to say the least. So I tried, thinking it would be too general but found a useful clue.

So based on this my clue is that I have a file somewhere in the project where I mixed up importand requirecalls in the same file. Problem is, I don't use require in any of my files :-(