From ec83670cc77808af6dc5d447a58fff97254ac6b4 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 3 Feb 2017 00:59:01 +0100 Subject: [PATCH] Check if BUILD_ID is available before starting (#960) * Check if BUILD_ID is available before starting * Leave whitespace at end of file --- bin/next-start | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/next-start b/bin/next-start index dd34b3a82e220..62eca75b80024 100755 --- a/bin/next-start +++ b/bin/next-start @@ -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) }