node.js - 部署错误。构建失败 : Build error details not available. Firebase 云函数

标签 node.js firebase npm google-cloud-functions

我重装过多次 NPMNode在我的电脑上。
(npm 版本 7.4.3)
( Node 版本 v15.7.0)
我遵循了配置 Firebase CLI 的过程。和:

npm install -g firebase-tools
firebase initfirebase deploy并且配置似乎工作正常。
当我打开 index.js 时,我面临的问题发生了文件,我取消注释股票 helloWorld 函数,它看起来像这样:
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 程序,但似乎没有解决此问题,部署时我仍然收到此错误。
我收到的日志错误是这样的:
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 提供的这个链接所建议的:
GCP Cloud Function - ERROR fetching storage source during build/deployFirebase CLI使用 NodeJS version 12在我的设备上,我有 version 15安装。
就用这个 guide降级您的 NodeJS 版本,一切正常。

关于node.js - 部署错误。构建失败 : Build error details not available. Firebase 云函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65955328/

相关文章:

node.js - npm下载phonegap多次报错

javascript - 如何在同构 react 应用程序中调用窗口函数?

Python-Firebase 监听器实现

ios - 为什么 Firebase 库没有导入到我的 iOS Swift 应用程序中?

node.js - Windows 8 上的“npm i”错误

javascript - 获取删除请求无法正常工作

node.js - Firebase从云函数API保存到数据库

使用热重载进行 Npm 本地模块开发

npm 5 构建缓存并传输到离线机器

javascript - 如果我清理所有输入,是否需要输出转义?