Skip to content

Commit 14ef3fc

Browse files
Only console error
1 parent 37f76b1 commit 14ef3fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/next-dev

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ clean(dir)
2727
// Check if pages dir exists and warn if not
2828
if (!(await exists(join(dir, 'pages')))) {
2929
if (await exists(join(dir, '..', 'pages'))) {
30-
throw new Error('> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory?')
30+
console.error('> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory?')
3131
} else {
32-
throw new Error('> Couldn\'t find a `pages` directory. Please create one under the project root')
32+
console.error('> Couldn\'t find a `pages` directory. Please create one under the project root')
3333
}
34+
exit(1)
3435
}
3536
})
3637
.catch((err) => {

0 commit comments

Comments
 (0)