Firebase 云功能以代码 16 退出什么是错误代码 16,我在哪里可以找到更多信息? [英] Firebase cloud function exits with code 16 what is error code 16 and where can I find more info?

查看:12
本文介绍了Firebase 云功能以代码 16 退出什么是错误代码 16,我在哪里可以找到更多信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 firebase 上的一个云功能以代码 16 作为错误退出.

one of my cloud functions on firebase exits with code 16 as an error.

我试图用谷歌搜索并找出该代码是什么,但完全没有运气.

I tried to google and find out what that code is but no luck at all.

Error: Process exited with code 16
    at process.on.code (/srv/node_modules/@google-cloud/functions-framework/build/src/invoker.js:393:29)
    at process.emit (events.js:189:13)
    at process.EventEmitter.emit (domain.js:441:20)
    at process.exit (internal/process/per_thread.js:168:15)
    at logAndSendError (/srv/node_modules/@google-cloud/functions-framework/build/src/invoker.js:184:9)
    at process.on.err (/srv/node_modules/@google-cloud/functions-framework/build/src/invoker.js:390:13)
    at process.emit (events.js:189:13)
    at process.EventEmitter.emit (domain.js:441:20)
    at emitPromiseRejectionWarnings (internal/process/promises.js:119:20)
    at process._tickCallback (internal/process/next_tick.js:69:34)

在哪里可以找到报告的错误代码,以便了解我的函数退出的原因?

Where can I find those error codes reported so I can understand why my function exits?

推荐答案

函数框架的代码其实是公开在GoogleCloudPlatform/functions-framework-nodejs 存储库(虽然没有在任何地方宣传).

The code for the function framework is actually public in the GoogleCloudPlatform/functions-framework-nodejs repository (although not advertised anywhere).

特别是您可以看到使用 killInstance 的情况,这是触发退出代码 16 的情况:

In particular you can see there the cases where killInstance is used, which is the one triggering exit code 16:

const killInstance = process.exit.bind(process, 16);

这些案例是(在撰写本文时):

These cases are (at the time of writing):

这篇关于Firebase 云功能以代码 16 退出什么是错误代码 16,我在哪里可以找到更多信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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