Skip to content

Commit

Permalink
fix(gatsby) improve missing page component error message (#12472)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherBiscardi authored and sidharthachatterjee committed Mar 11, 2019
1 parent 0f136d5 commit 331638a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/gatsby/src/redux/actions.js
Expand Up @@ -192,7 +192,9 @@ ${reservedFields.map(f => ` * "${f}"`).join(`\n`)}
// component paths.
if (process.env.NODE_ENV !== `test`) {
if (!fileExistsSync(page.component)) {
const message = `${name} created a page with a component that doesn't exist`
const message = `${name} created a page with a component that doesn't exist. Missing component is ${
page.component
}`
console.log(``)
console.log(chalk.bold.red(message))
console.log(``)
Expand Down

0 comments on commit 331638a

Please sign in to comment.