简体   繁体   中英

How to fix a white screen with a react webapp?

I get a white screen on my react webapp (testing it in local), it worked perfectly yesterday and today when I tried it I got a white screen.

I tried to look in the react developer tools but I don't see anything. I use in this web app React router and firebase. Below is my package.json

 {
      "name": "numbr",
      "version": "0.1.0",
      "private": true,
      "dependencies": {
        "@material-ui/core": "^4.3.1",
        "express": "^4.17.1",
        "firebase": "^6.3.4",
        "mysql": "^2.17.1",
        "node-sass": "^4.12.0",
        "nodemon": "^1.19.1",
        "react": "^16.8.6",
        "react-dom": "^16.8.6",
        "react-native-indicators": "^0.13.0",
        "react-router-dom": "^5.0.1",
        "react-scripts": "3.0.1",
        "recompose": "^0.30.0"
      },
      "scripts": {
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
      },
      "eslintConfig": {
         "extends": "react-app"
      },
      "browserslist": {
        "production": [
          ">0.2%",
          "not dead",
          "not op_mini all"
        ],
        "development": [
          "last 1 chrome version",
          "last 1 firefox version",
          "last 1 safari version"
        ]
      }
    }

Thanks for your help in advance !

2 things i can think of based on my own experience:

  1. clear all your cache, and restart.
  2. Your file path to some things in your code is too long (especially in node_modules).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM