My project was functioning well as usual until I attempted to run 'gatsby build' and encountered the following error message:
ReferenceError: Cannot access '_404' before initialization
as well as
ReferenceError: Cannot access '_mdx_slug_' before initialization
I haven't made any recent changes that could have caused this issue, and I am unsure of the source of the problem. It seems to be related to the way gatsby is constructing the website's pages, but my level of expertise is not advanced enough to pinpoint the exact cause.
gatsby build
output:
success load gatsby config - 0.041s
success load plugins - 0.757s
success onPreInit - 0.029s
success initialize cache - 0.046s
success copy gatsby files - 0.183s
...
Any assistance or insight on this matter would be greatly appreciated. Thank you.