gpt4 book ai didi

firebase - firebase 中的 Cloud Function 错误参数 'id' 必须是非空字符串

转载 作者:行者123 更新时间:2023-12-04 02:47:43 25 4
gpt4 key购买 nike

我正在部署一个 API GRAPHQL

当执行 firebase servefirebase deploy 时,我给出了这个错误 TypeError [ERR_INVALID_ARG_VALUE]: The argument 'id' must be a non-empty string。收到''

I using this repo to guide me

这是我的配置

firebase.json

{
"functions": {
"predeploy": ["npm --prefix \"$RESOURCE_DIR\" run lint"],
"source": "."
},
"hosting": {
"public": "public",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}

package.json

{
"name": "api-gql-firebase",
"version": "1.0.0",
"description": "",
"main": "dist/functions.js",
"engines": {
"node": "10"
},
"scripts": {
"watch": "parcel src/functions.js --target node",
"build": "parcel build src/functions.js --target node --detailed-
report",
"serve": "firebase serve --only functions",
"emulator": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"predeploy": "npm run build",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"repository": {
"type": "git",
"url": "git@gitlab.com:code-training/nodejs/api-gql-firebase.git"
},
"dependencies": {
"apollo-server-express": "^2.6.3",
"express": "^4.17.1",
"firebase-admin": "^8.2.0",
"firebase-functions": "^3.0.1",
"graphql": "^14.3.1"
},
"devDependencies": {
"firebase-functions-test": "^0.1.6",
"parcel-bundler": "^1.12.3"
}
}

谁知道为什么会这样,谢谢

最佳答案

在我的例子中,这个错误是由于缺少“grpc”依赖而出现的。安装后,它可以工作。遗憾的是,它没有在任何地方记录。

关于firebase - firebase 中的 Cloud Function 错误参数 'id' 必须是非空字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56676837/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com