Skip to content

Commit 37f76b1

Browse files
Error instead of warning on missing pages dir
1 parent 1bf98ea commit 37f76b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/next-dev

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ 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-
console.warn('> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory?')
30+
throw new Error('> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory?')
3131
} else {
32-
console.warn('> Couldn\'t find a `pages` directory. Please create one under the project root')
32+
throw new Error('> Couldn\'t find a `pages` directory. Please create one under the project root')
3333
}
3434
}
3535
})

0 commit comments

Comments
 (0)