Skip to content

Commit

Permalink
Don't exit on errors as during development, empty/incomplete page com…
Browse files Browse the repository at this point in the history
…ponents are common fixes #4027 (#4040)

* Don't exit on errors as during development, empty/incomplete page components are common fixes #4027

* Fix other points of death

* Ok, do die here
  • Loading branch information
KyleAMathews authored Feb 15, 2018
1 parent 80ea5e8 commit 42190dc
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/gatsby/src/redux/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,10 @@ actions.createPage = (page: PageInput, plugin?: Plugin, traceId?: string) => {
`You have an empty file in the "src/pages" directory at "${relativePath}". Please remove it or make it a valid component`
)
console.log(``)
process.exit(1)
// TODO actually do die during builds.
// process.exit(1)
}

console.log(``)
console.log(``)
console.log(
`The page component at "${relativePath}" didn't pass validation`
)

if (!includesDefaultExport) {
console.log(``)
console.log(
Expand All @@ -249,7 +244,8 @@ actions.createPage = (page: PageInput, plugin?: Plugin, traceId?: string) => {
console.log(``)
}

process.exit(1)
// TODO actually do die during builds.
// process.exit(1)
}
}

Expand Down

0 comments on commit 42190dc

Please sign in to comment.