部署错误.构建失败:构建错误详细信息不可用.Firebase云功能 [英] Deployment error. Build failed: Build error details not available. Firebase Cloud Functions

查看:49
本文介绍了部署错误.构建失败:构建错误详细信息不可用.Firebase云功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在PC上多次重新安装了 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初始化 firebase部署,配置似乎可以正常工作.

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 并收到此错误

functions[helloWorld(us-central1)]: Deployment error.
Build failed: Build error details not available. Please check the logs at https://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 版本12 ,而在我的设备上安装了版本15 .

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

只需使用此

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

这篇关于部署错误.构建失败:构建错误详细信息不可用.Firebase云功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆