Open win10ogod opened 4 months ago
Hey, some quick solutions from GPT:
cross-env
The cross-env
package allows you to set environment variables across different platforms in a consistent way. First, you need to install cross-env
:
npm install cross-env --save-dev
Then, modify your package.json
script to use cross-env
:
"scripts": {
"start": "cross-env PORT=8080 next start"
}
set
Command in WindowsIf you prefer not to use an additional package, you can modify your package.json
to use the set
command, which is recognized by Windows:
"scripts": {
"start": "set PORT=8080 && next start"
}
That seems to have fixed it for me, the following line: "start": "set PORT=8080 && next start"
Support WINDOWS