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

Vite+React(TypeScript)项目部署gh-pages后页面空白求助

问题求助:React+Vite项目部署到GitHub Pages后控制台报错
  • gh-pages分支仓库:https://github.com/Squinnb/acquco/tree/gh-pages
  • 主分支仓库:https://github.com/Squinnb/acquco
  • 已部署页面地址:https://squinnb.github.io/acquco/

开发使用 Vite、Yarn、React(TypeScript),项目的package.json内容如下:

{
  "name": "acquco",
  "private": true,
  "version": "0.0.0",
  "homepage": "https://squinnb.github.io/acquco",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "preview": "vite preview",
    "predeploy": "yarn run build",
    "deploy": "gh-pages -d dist"
  },
  "dependencies": {
    "@types/react-router-dom": "^5.3.3",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-router-dom": "^6.4.3"
  },
  "devDependencies": {
    "@types/react": "^18.0.24",
    "@types/react-dom": "^18.0.8",
    "@vitejs/plugin-react": "^2.2.0",
    "gh-pages": "^4.0.0",
    "typescript": "^4.9.3",
    "vite": "^3.2.3"
  }
}

控制台报错截图:
控制台报错截图

恳请各位提供解决建议,谢谢。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.10 22:05:22