Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds error message with filename on Markdown error, fixes bug in panicOnBuild #8866

Merged
merged 5 commits into from
Oct 9, 2018
Prev Previous commit
Next Next commit
Only shows path in the error if it's a file
  • Loading branch information
mslooten committed Oct 8, 2018
commit d54169a57d29a5058c28bc7c75e12a01a12606a5
4 changes: 3 additions & 1 deletion packages/gatsby-transformer-remark/src/on-node-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ module.exports = async function onCreateNode(
createParentChildLink({ parent: node, child: markdownNode })
} catch (err) {
reporter.panicOnBuild(
`Error processing Markdown file ${node.absolutePath}:\n
`Error processing Markdown file${
node.absolutePath ? ` ${node.absolutePath}` : ``
}:\n
${err.message}`
)
}
Expand Down