1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Only console error

This commit is contained in:
Dan Zajdband 2016-10-25 15:27:21 +01:00
parent 37f76b16bc
commit 14ef3fcfca

View file

@ -27,10 +27,11 @@ clean(dir)
// Check if pages dir exists and warn if not
if (!(await exists(join(dir, 'pages')))) {
if (await exists(join(dir, '..', 'pages'))) {
throw new Error('> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory?')
console.error('> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory?')
} else {
throw new Error('> Couldn\'t find a `pages` directory. Please create one under the project root')
console.error('> Couldn\'t find a `pages` directory. Please create one under the project root')
}
exit(1)
}
})
.catch((err) => {