1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Check if BUILD_ID is available before starting (#960)

* Check if BUILD_ID is available before starting

* Leave whitespace at end of file
This commit is contained in:
Tim Neutkens 2017-02-03 00:59:01 +01:00 committed by Guillermo Rauch
parent efe0c7b433
commit ec83670cc7

View file

@ -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)
}