Skip to content

Clear up error message when production build is missing during next start #19778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
timneutkens opened this issue Dec 3, 2020 · 1 comment · Fixed by #19777
Closed

Clear up error message when production build is missing during next start #19778

timneutkens opened this issue Dec 3, 2020 · 1 comment · Fixed by #19777
Assignees
Milestone

Comments

@timneutkens
Copy link
Member

From @jlongster

yarn start didn't work

Steps:

$ git clone https://github.com/colinhacks/devii.git
$ yarn
$ yarn start

Error:

Error: Could not find a valid build in the '<redacted>/.next' directory! Try building your app with 'next build' before starting the server.
    <redacted>
error Command failed with exit code 1.

yarn start is usually the way you start developing. Looking at the readme of the repo I saw it says to use yarn dev. Doing that works, but looking at package.json I see scripts that map to next dev and next start. Don't know why there are two different commands that are similar.

The above error message should be more helpful

@timneutkens timneutkens added bug Issue was opened via the bug report template. kind: story and removed bug Issue was opened via the bug report template. labels Dec 3, 2020
@timneutkens timneutkens self-assigned this Dec 3, 2020
@timneutkens timneutkens added this to the iteration 14 milestone Dec 3, 2020
@kodiakhq kodiakhq bot closed this as completed in #19777 Dec 8, 2020
kodiakhq bot pushed a commit that referenced this issue Dec 8, 2020
…export` (#19777)

Adds an err.sh link to the production build missing message. Also clears up `valid` as `production`.

Also fixes an edge case where an unhelpful error would be thrown because we checked for `.next` instead of `.next/BUILD_ID`

Added the out directory location as the list line during export to make sure people know where the files are output. 

Fixes #19778
Fixes #19788
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
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 a pull request may close this issue.

2 participants