Change defaultCommand of node_modules/bin/next from "dev" to "start" or allow override via environment variable #25750
novazembla
started this conversation in
Ideas
Replies: 2 comments
-
need this, everytime cd'ing through server to .bin/next is time-consuming, even change dev to start, sometimes it revert to dev . |
Beta Was this translation helpful? Give feedback.
0 replies
-
I would love this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature you'd like to request
I've had to install next.js on a VPS running Plesk+Passenger. To avoid a custom server I've tried to use the next script as the application script by pointing to node_modules/bin/next (a configuration of a script with a terminal argument is unfortunately not possible).
This works well but the app starts in dev mode which is obviously not good for a production site. As the defaultCommand is hardcoded I had to clone the script and adjust it to work with start as the default command and the requires to match the new script's location.
As I'm not fully aware about the reason behind having dev as default command but have found that several people are stuck at very similar points. I suggest to either change the default from dev to start (if possible) or allow at least to adjust the default command via a environment variable.
Describe the solution you'd like
Please change the
const defaultCommand = "dev";
to
const defaultCommand = "start";
or add something like
Describe alternatives you've considered
As described an alternative workaround was to clone the script, to make it part of "my" code base, and make some small adjustments to allow to start it in "start" without any further arguments.
Beta Was this translation helpful? Give feedback.
All reactions