簡體   English   中英

如何使用react webapp修復白屏?

[英]How to fix a white screen with a react webapp?

我的 react webapp 出現白屏(在本地測試),昨天和今天都運行良好,當我嘗試時,我得到了一個白屏。

我試圖查看 React 開發人員工具,但什么也沒看到。 我在這個 Web 應用程序中使用 React 路由器和 Firebase。 下面是我的 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"
        ]
      }
    }

提前感謝您的幫助!

根據我自己的經驗,我能想到的2件事:

  1. 清除所有緩存,然后重新啟動。
  2. 代碼中某些內容的文件路徑太長(尤其是在 node_modules 中)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM