Skip to content

Conversation

@impronunciable
Copy link
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 :)

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
Member

Choose a reason for hiding this comment

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

`pages`

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
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.

3 participants