Am having issues running a react
app on windows
.
The app was initially setup to run on a macOS
.
Below are the error messages and package.json
file.
Question:
How can I start and build PORT
for windows?
package.json
{
"name": "tradingview-finnhub",
"private": true,
"dependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.4.0",
"request-promise": "^4.2.5"
},
"scripts": {
"start": "PORT=8080 react-scripts start",
"build": "PORT=8080 react-scripts build"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Error message
'PORT' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! tradingview-finnhub@ start: `PORT=8080 react-scripts start`
npm ERR! Exit status 1