2

npm start command not progressing after below point -

enter image description here

Application is not getting loaded due to this.

Below is package.json -

{
  "name": "reacttest",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^4.12.1",
    "@material-ui/data-grid": "^4.0.0-alpha.33",
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^11.2.7",
    "@testing-library/user-event": "^12.8.3",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-facebook-login": "^4.1.1",
    "react-google-login": "^5.2.2",
    "react-redux": "^7.2.4",
    "react-scripts": "4.0.3",
    "redux": "^4.1.0",
    "web-vitals": "^1.1.2"
  },
  "scripts": {
    "start": "set HTTPS=true&&react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
RobC
  • 22,977
  • 20
  • 73
  • 80
C Sharper
  • 8,284
  • 26
  • 88
  • 151
  • Try running this in the command prompt instead of powershell. I think the syntax to run two commands in sequence is different in powershell (though not sure what it is) – apokryfos Jul 12 '21 at 11:26
  • @apokryfos - Stucking at same point on console also – C Sharper Jul 12 '21 at 11:33

2 Answers2

1

Windows (cmd.exe)

set HTTPS=true&&npm start

Windows (Powershell)

($env:HTTPS = "true") -and (npm start)

Linux, macOS (Bash)

HTTPS=true npm start
Rukshan Jayasekara
  • 1,945
  • 1
  • 6
  • 26
0

add variable in .env

 REACT_APP_HTTPS = true

and in script

"scripts": {
    "start": "react-scripts start",
    ....
}

then run npm start and see.

Avani Bataviya
  • 750
  • 1
  • 6
  • 20