0

I am trying to deploy the code on gatsby. however, I am getting this error continuously. can someone tell me why it's getting failed. Gatsby documentation is not really clear about the errors and solving troubleshoot problems. I have tried re-build multiples times.

deleted the cache locally and node_modules. however,problem is not fixed. error2 error3 logs

Truncated page data information for the failed page /404/: {
  "errors": {},
  "path": /404/,
  "slicesMap": {},
  "pageContext": {}
 }`
For more details see https://gatsby.dev/issue-how-to
Building static HTML failed for path /404/
For more details see https://gatsby.dev/debug-html

I have try to redeploy, trigger deploy and install the node_modules.

Arctodus
  • 5,743
  • 3
  • 32
  • 44

1 Answers1

0

This can happen for numerous reasons. We'd need a link to a repo as the issue can be in your gatsby-config.json or a specific component src file.

Generally speaking the steps to debug this are as follows:

  1. Carefully check gatsby-config.js and gatsby-node.js for typos, such as bad syntax (you passed an argument that doesn't exist or has a typo), or just an incorrect value given in a field configurating a plugin (the plugin should give a specific error output for this, but not all do).
  2. Verify you are not accidentally using an old obsolete plugin, disable all non-default plugins and try building, re-enabling each one at a time. Some plugins have confusingly similar names so pay close attention to that when checking the docs for your plugin.
  3. Check your 404 src file for any syntax errors, typos in attributes/props/queries etc.
  4. Comment all sections of the 404 page out, and if you can build successfully, then re-enable each unique section one at a time, building each time, until you get the error again (identifying the problematic component/section).