简体   繁体   English

firebase:在 github 动作部署上找不到

[英]firebase: not found on github action deploy

React app deploys fine through local cli, though on github actions it fails with error: React 应用程序通过本地 cli 部署良好,但在 github 操作上失败并出现错误:

 sh: 1: firebase: not found Error: Process completed with exit code 127.

package.json: package.json:

 "scripts": { "start": "react-scripts start", "build": "CI=false react-scripts build && firebase deploy -P riplir", "test": "react-scripts test", "eject": "react-scripts eject" },

What am I doing wrong here?我在这里做错了什么?

I would assume from this that you have the firebase executable on your desktop and not in the pipeline.我会假设您在桌面上拥有 firebase 可执行文件,而不是在管道中。 Whilst the pipeline could be totally valid commands and configuration for firebase, it won't be able to do anything without the executable.虽然管道对于 firebase 可能是完全有效的命令和配置,但如果没有可执行文件,它将无法执行任何操作。

Try adding a pre-requisite command like:尝试添加一个先决条件命令,例如:

npm init
npm install --save firebase

Or using an image that is guaranteed to have an update to date version of the firebase executable present.或者使用保证存在 firebase 可执行文件的最新版本的映像。

See the Firebase package for more information.有关详细信息,请参阅Firebase package

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM