Skip to content
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

Next build doesn't exit #2775

Closed
terimyaki opened this issue Aug 14, 2017 · 2 comments
Closed

Next build doesn't exit #2775

terimyaki opened this issue Aug 14, 2017 · 2 comments

Comments

@terimyaki
Copy link

Hi,

I am trying to run my next app in production, programmatically. However I notice it never exits the next build step and instead starts the server on port 3000, without hitting the start script.

Package.json

"scripts": {
    "start:prod": "npm run build && cross-env NODE_ENV=production node server",
    "build": "next client/ && next build"
}
Directory Structure
+ client/
+ - build/
+ - components/
+ - pages/
+ - static/
+ - next.config.js
+ server/
+ - index.js

Screenshot
screen shot 2017-08-14 at 10 27 08 am

@sergiodxa
Copy link
Contributor

In your build script you're running next client/ before next build, that's running Next for development which build files and run a server.

@terimyaki
Copy link
Author

Thanks. Found out it was next build client/ to build the correct next app directory.

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants