From 3daf53f3d6baf87ade2ce14ee33946029a7a7844 Mon Sep 17 00:00:00 2001 From: tim neutkens Date: Thu, 2 Feb 2017 21:06:20 +0100 Subject: [PATCH 1/2] Check if BUILD_ID is available before starting --- bin/next-start | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/next-start b/bin/next-start index dd34b3a82e220..4d59d4b054d33 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) } @@ -57,4 +57,3 @@ srv.start(argv.port) console.error(err) process.exit(1) }) - From 294c24212673151d41d049a0fdfbe2caf1a8614a Mon Sep 17 00:00:00 2001 From: tim neutkens Date: Thu, 2 Feb 2017 21:10:29 +0100 Subject: [PATCH 2/2] Leave whitespace at end of file --- bin/next-start | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/next-start b/bin/next-start index 4d59d4b054d33..62eca75b80024 100755 --- a/bin/next-start +++ b/bin/next-start @@ -57,3 +57,4 @@ srv.start(argv.port) console.error(err) process.exit(1) }) +