Skip to content

Added warning when pages dir is not present#14

Merged
rauchg merged 3 commits into
masterfrom
add/pages-warn
Oct 17, 2016
Merged

Added warning when pages dir is not present#14
rauchg merged 3 commits into
masterfrom
add/pages-warn

Conversation

@impronunciable
Copy link
Copy Markdown
Contributor

Added warning when pages dir is not present and a special one if it exists as a sibling of the project root.

Please review the copy :)

Comment thread bin/next-dev Outdated
if (await exists(join(dir, '..', 'pages'))) {
console.warn('> Pssst, there is a pages directory next to your project root. Next expects this to be under your project root directory.')
} else {
console.warn('> Couldn\'t find a pages directory. Please create one under the project root')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`pages`

Comment thread bin/next-dev Outdated
// Check if pages dir exists and warn if not
if (!await exists(join(dir, 'pages'))) {
if (await exists(join(dir, '..', 'pages'))) {
console.warn('> Pssst, there is a pages directory next to your project root. Next expects this to be under your project root directory.')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say:

> No `pages` directory found. Did you mean to run `next` in the parent (`../`) directory? 

@rauchg rauchg merged commit d9b1828 into master Oct 17, 2016
@rauchg rauchg deleted the add/pages-warn branch October 17, 2016 01:04
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants