mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
better exit message
This commit is contained in:
parent
5ba7d593aa
commit
f3ecfb6a92
@ -90,10 +90,11 @@ export default class Builder extends Tapable {
|
|||||||
|
|
||||||
if (this._nuxtPages) {
|
if (this._nuxtPages) {
|
||||||
if (!fs.existsSync(join(this.options.srcDir, 'pages'))) {
|
if (!fs.existsSync(join(this.options.srcDir, 'pages'))) {
|
||||||
|
let dir = this.options.srcDir
|
||||||
if (fs.existsSync(join(this.options.srcDir, '..', 'pages'))) {
|
if (fs.existsSync(join(this.options.srcDir, '..', 'pages'))) {
|
||||||
console.error('> No `pages` directory found. Did you mean to run `nuxt` in the parent (`../`) directory?') // eslint-disable-line no-console
|
console.error(`> No 'pages' directory found in ${dir}. Did you mean to run 'nuxt' in the parent ('../') directory?`) // eslint-disable-line no-console
|
||||||
} else {
|
} else {
|
||||||
console.error('> Couldn\'t find a `pages` directory. Please create one under the project root') // eslint-disable-line no-console
|
console.error(`> Couldn't find a 'pages' directory in ${dir}. Please create one under the project root`) // eslint-disable-line no-console
|
||||||
}
|
}
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user