Commit 37f76b16 authored by Dan Zajdband's avatar Dan Zajdband

Error instead of warning on missing pages dir

parent 1bf98eaa
...@@ -27,9 +27,9 @@ clean(dir) ...@@ -27,9 +27,9 @@ clean(dir)
// Check if pages dir exists and warn if not // Check if pages dir exists and warn if not
if (!(await exists(join(dir, 'pages')))) { if (!(await exists(join(dir, 'pages')))) {
if (await exists(join(dir, '..', 'pages'))) { if (await exists(join(dir, '..', 'pages'))) {
console.warn('> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory?') throw new Error('> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory?')
} else { } else {
console.warn('> Couldn\'t find a `pages` directory. Please create one under the project root') throw new Error('> Couldn\'t find a `pages` directory. Please create one under the project root')
} }
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment