部署错误.构建失败:构建错误详细信息不可用.Firebase 云函数

编程入门 行业动态 更新时间:2024-10-24 18:26:21
本文介绍了部署错误.构建失败:构建错误详细信息不可用.Firebase 云函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在我的电脑上多次重新安装了 NPM 和 Node.

I reinstalled multiple times NPM and Node on my pc.

(npm 版本 7.4.3)

(npm version 7.4.3)

(节点版本v15.7.0)

(node version v15.7.0)

我按照以下步骤配置 Firebase CLI:

I followed the procedure for configuring the Firebase CLI with:

npm install -g firebase-tools

和 firebase init 和 firebase deploy 并且配置似乎工作正常.

and firebase init and firebase deploy and the configuration seems to work fine.

当我打开 index.js 文件并取消注释股票 helloWorld 函数时,我面临的问题如下所示:

The problem I'm facing happens when I open the index.js file and I uncomment the stock helloWorld function which looks like this:

exports.helloWorld = functions.https.onRequest((request, response) => { functions.logger.info("Hello logs!", {structuredData: true}); response.send("Hello from Firebase!"); });

我运行 firebase deploy 并收到此错误

I run firebase deploy and I receive this error

functions[helloWorld(us-central1)]: Deployment error. Build failed: Build error details not available. Please check the logs at console. {urlStuff} Functions deploy had errors with the following functions: helloWorld To try redeploying those functions, run: firebase deploy --only "functions:helloWorld" To continue deploying other features (such as database), run: firebase deploy --except functions Error: Functions did not deploy properly.

老实说,我现在不知道该怎么办.我多次尝试重新安装 node 和 npm 并重新执行 Firebase CLI 程序,但似乎没有解决这个问题,我在部署时仍然收到此错误.

I honestly don't know what to do now. I tried multiple times to re install node and npm and re doing the Firebase CLI procedure but nothing seems to solve this problem, I still receive this Error when deploying.

我收到的日志错误是这样的:

The log error I receive is this :

textPayload: "ERROR: error fetching storage source: generic::unknown: retry budget exhausted (3 attempts): fetching gcs source: unpacking source from gcs: source fetch container exited with non-zero status: 1"

推荐答案

正如@Muthu Thavamani 提供的此链接所建议的那样:

As suggested by this link provided by @Muthu Thavamani :

GCP 云功能 - 在获取存储源期间出错构建/部署

Firebase CLI 使用 NodeJS version 12 而在我的设备上我安装了 version 15.

Firebase CLI uses NodeJS version 12 while on my device I had version 15 installed.

只需使用此 指南 降级您的 NodeJS 版本,一切正常.

Just use this guide to downgrade your version of NodeJS and everything works fine.

更多推荐

部署错误.构建失败:构建错误详细信息不可用.Firebase 云函数

本文发布于:2023-06-13 00:02:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/670319.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   详细信息   不可用   函数   Firebase

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!