gh-pages -d 构建失败

问题描述 投票:0回答:1

添加所有 pre_Deploy、Deploy、主页后我仍然收到错误

enter image description here

{
  "name": "vite-project",
  "private": true,
  "version": "0.0.0",
  "homepage": "https://rijuoddusual1999.github.io/simpleparallax",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
    "preview": "vite preview"
  },

我尝试了多次都以失败告终,我希望这个工作已经晚了

javascript github-pages
1个回答
0
投票

您需要将构建文件夹设置为您自己的构建文件夹,该文件夹在不同的项目设置中有所不同。在您的情况下,假设

dist
是您的构建文件夹,请将脚本更改为:

"predeploy": "npm run dist",
"deploy": "gh-pages -d dist",
© www.soinside.com 2019 - 2024. All rights reserved.