chrisblakely01 / react-budget-app

70 stars 89 forks source link

Unable to run the app in a windows machine #1

Open jarvisRam opened 3 years ago

jarvisRam commented 3 years ago

Windows users can't run the app after 'npm install' due to the npm start port configuration command. Below is the error seen, image

Editing package.json as below would resolve the issue, "scripts": { "start": "(set PORT=3006 || export PORT=3006) && react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" },

DayanandEllojiTR commented 3 years ago

Failed to compile.

./src/components/EditBudget.js Syntax error: C:/temp/budget-app/src/components/EditBudget.js: Unexpected token (6:3)

4 | const [value, setValue] = useState(props.budget); 5 | return (

6 | <> | ^ 7 | <input 8 | required='required' 9 | type='number'

Faced this error while running on windows.

rutvikk05 commented 1 year ago

In Windows you can set scripts in package.json:

Delete set PORT=portnumber &&

and keep it like this :

"start": "react-scripts start"

Now do npm start and it will work in windows.