You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React应用部署后显示空白页求助(Netlify等平台)

部署React应用后多平台白屏问题求助

本地环境运行完全正常的React应用,部署到Netlify、Vercel、Render、GitHub Pages等平台后,页面仅显示空白白屏,浏览器控制台存在报错但无法自行修复。

已尝试的部署平台

  • Netlify
  • Vercel
  • Render
  • GitHub Pages

Package.json配置

{  
  "homepage": "https://aviralmehrotra.github.io/retro-flix/",  
  "name": "popcorn",  
  "version": "0.1.0",  
  "private": true,  
  "dependencies": {    
    "@testing-library/jest-dom": "^5.17.0",    
    "@testing-library/react": "^13.4.0",    
    "@testing-library/user-event": "^13.5.0",    
    "react": "^18.2.0",    
    "react-dom": "^18.2.0",    
    "react-scripts": "5.0.1",    
    "web-vitals": "^2.1.4"  
  },  
  "scripts": {    
    "start": "react-scripts start",    
    "build": "react-scripts build",    
    "predeploy": "npm run build",    
    "deploy": "gh-pages -d 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"    
    ]  
  },  
  "devDependencies": {    
    "gh-pages": "^6.0.0"  
  }
}

已尝试的解决方案

  • 直接从GitHub仓库部署
  • 从build文件夹部署
  • 检查部署日志未发现特定报错
  • 在不同浏览器测试,问题依旧存在

内容的提问来源于stack exchange,提问作者Aviral Mehrotra

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 15:47:28