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:
parent
efe0c7b433
commit
ec83670cc7
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue