我重装过多次 NPM
和 Node
在我的电脑上。
(npm 版本 7.4.3)
( Node 版本 v15.7.0)
我遵循了配置 Firebase CLI
的过程。和:
npm install -g firebase-tools
和 firebase init
和 firebase 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/