Skip to content

Commit

Permalink
Check if BUILD_ID is available before starting (#960)
Browse files Browse the repository at this point in the history
* Check if BUILD_ID is available before starting

* Leave whitespace at end of file
  • Loading branch information
timneutkens authored and rauchg committed Feb 2, 2017
1 parent efe0c7b commit ec83670
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/next-start
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const dir = resolve(argv._[0] || '.')

const srv = new Server({ dir })

if (!existsSync(resolve(dir, '.next'))) {
console.error(`> Could not find the '.next' directory! Try building your app with 'next build' before starting the server.`)
if (!existsSync(resolve(dir, '.next', 'BUILD_ID'))) {
console.error(`> Could not find a valid build in the '.next' directory! Try building your app with 'next build' before starting the server.`)
process.exit(1)
}

Expand Down

0 comments on commit ec83670

Please sign in to comment.