reactjs - 我正在使用 gh-pages 来部署一个 github 页面,但是当它之前工作正常时我现在遇到了一个错误
问题描述
在我的 package.json 中,我有正确的主页。我安装了 gh-pages 并添加了这两个脚本
"predeploy": "npm run build",
"deploy": "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! portfolio@0.1.0 deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the portfolio@0.1.0 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\Austin\AppData\Roaming\npm-cache\_logs\2020-01-31T04_47_04_970Z-debug.log
可能是什么问题,我该如何解决?谢谢您的帮助!
解决方案
我实际上能够通过安装最新版本的 Node.js 来解决这个问题。这解决了一切,谢谢!
推荐阅读
- php - MYSQL比较同一列中的值
- webhooks - BigCommerce 蓝图网站上的 Webhook 没有快速响应(响应延迟)
- java - 为什么添加 5 个对象后这个集合的大小为 1?
- websocket - rxjs websocket - 互联网连接丢失
- entity-framework-migrations - 实体框架 6 DbMigration 中的 EntityTypeConfigurations 过多:StackoverflowException
- django - 如何获取用户关联的所有组?
- android - 在路径上找不到类“my.MainActivity”:DexPathList
- azure - 如何将对象列表作为参数传递给 Azure CosmosDB (DocumentDB) 存储过程?
- templates - 可变参数模板、std::function 和 lambdas 作为类成员
- go - 我们如何使用 kubernetes API 进行 kubernetes 集群信息转储