As of yesterday, I have noticed that all Gatsby builds are failing with the following error messages. This also happens on my local machine (macOS), so I am thinking that a dependency failure after an update, but the level of logging does not help me pinpoint the error. Similar error messages I have researched are usually followed by an actual error message!
There are no other error messages being logged, and I would like to know how I am able to get more logging detail. I have tried gatsby --verbose, but this produces no more logging.
hey Ian, I think that your idea around this being a failure due to a dependency upgrade is likely accurate, especially as the issue isn’t specific to netlify if it occurs locally.
Your best bet here is to stop trying to make the deploy work onto our servers (and save your build minutes) and get a local build to work first. Then, be sure to commit the package-lock file along with your package.json, so that you have the blueprint for a working config deployed.
Then, you’ll want to choose “clear cache and redeploy” so you get a fresh set of dependencies. Again, this’ll only work if you’ve already got a working config locally, so that has to happen first.
Best of luck - hit us up again if you can’t remediate.
Many thanks for the response. Yes, I intend to fix locally before the next deployment to Netlify. However, I am struggling with fault finding as the level of logging in Gatsby does not seem very high, so hard to find the issue with such a generic error message.
I have managed to solve this issue. I have replaced the following line in all js files:
import { tw, styled } from “twin.macro”
with an updated import statement.
import tw, { styled } from 'twin.macro’
Now the site compiles correctly. It is strange that the errors started to be generated without any site changes, so I am assuming that there must have been a recent change in the plugin that caused it to suddenly fail.