next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Can not run the command "npm start"

Open nguyenkhois opened this issue 7 years ago • 1 comments

Examples bug report

Example name

custom-server-express

Describe the bug

Can not run the command npm start.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Run npm start
  2. See an error

'NODE_ENV' is not recognized as an internal or external command, operable program or batch file.

Expected behavior

Next.js app should be started.

System information

  • OS: Windows 10 version 1809
  • Browser: Chrome version 73
  • Version of Next.js: 8.0.4
  • Version of Node.js: 10.15.3 (LTS version)

Additional context

  • Solved with SET NODE_ENV=production && node server.js

nguyenkhois avatar Apr 03 '19 12:04 nguyenkhois

You can add cross-env to the example.

timneutkens avatar Apr 03 '19 12:04 timneutkens