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
Shows node.id when absolutePath is not available
As discussed in the PR, it might help people to show the node id when no absolutePath is available (e.g. when not using a file to supply the Markdown)
  • Loading branch information
mslooten committed Oct 9, 2018
commit 390dc85f27c97e83d95ac47f7c5dd05f4eb9e0e8
4 changes: 2 additions & 2 deletions packages/gatsby-transformer-remark/src/on-node-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ module.exports = async function onCreateNode(
createParentChildLink({ parent: node, child: markdownNode })
} catch (err) {
reporter.panicOnBuild(
`Error processing Markdown${
node.absolutePath ? ` file ${node.absolutePath}` : ``
`Error processing Markdown ${
node.absolutePath ? `file ${node.absolutePath}` : `in node ${node.id}`
}:\n
${err.message}`
)
Expand Down