gpt4 book ai didi

git - 对 Github Pages 使用 npm run deploy 时 gh-pages -d build 失败

转载 作者:行者123 更新时间:2023-12-04 15:56:04 24 4
gpt4 key购买 nike

在将我的应用程序的最新副本推送到 Github 后执行 npm run deploy 时,我收到此错误,指出它找不到 git-upload-pack。我睡在上面,第二天早上醒来,npm run deploy 运行良好,没有错误。不,它又回来了。

只是为了了解一些背景知识,我确实克隆了一个旧的 repo 以将其从 React 更新为 React 和 Redux。我已经更改了 package.json 中的主页,使用 rm -rf .git 删除了 git 文件,然后使用 git init 重新设置了它。

知道为什么会这样吗?

    > todo-list@0.1.1 deploy C:\Users\Andrew\Documents\code\react-redux-todo-list                     
> gh-pages -d build

git-upload-pack '.': git-upload-pack: command not found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todo-list@0.1.1 deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todo-list@0.1.1 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Andrew\AppData\Roaming\npm-cache\_logs\2018-07-29T20_55_53_405Z-debug.log
  • 2018 年 7 月 30 日更新:出于某种原因,它现在让我进行部署。这是工程学吗?

最佳答案

确保没有其他配置文件(除了 package.json)仍引用 GitHub 存储库 URL。 Check your git config -l .

git init 之后,确保至少进行一次新提交,并推送到相应的新 GitHub 存储库。

关于git - 对 Github Pages 使用 npm run deploy 时 gh-pages -d build 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51584518/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com