Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/gatsby/src/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ module.exports = async function build(program: BuildArgs) {
await buildHTML(program, activity).catch(err => {
reportFailure(
report.stripIndent`
Building static HTML failed for path "${chalk.bold(err.context.path)}"
Building static HTML failed${
err.context && err.context.path
? ` for path "${chalk.bold(err.context.path)}"`
: ``
}

See our docs page on debugging HTML builds for help https://gatsby.app/debug-html
`,
Expand Down