问题
I cant figure out why when I pass in the option --inspect-functions
to firebase emulators:start
I get an error saying error: unknown option '--inspect-functions'
But when I run firebase emulators:start
with any options the emulator runs perfectly, So
I am bit stumped and would appreciate any help.
This is my functions/package.json
:
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "8"
},
"dependencies": {
"firebase-admin": "^8.6.0",
"firebase-functions": "^3.3.0",
"fs-extra": "^8.1.0",
"moment": "^2.24.0",
"pdfkit": "^0.11.0"
},
"devDependencies": {
"@google-cloud/functions-framework": "^1.3.2",
"eslint": "^5.12.0",
"eslint-plugin-promise": "^4.0.1",
"firebase-functions-test": "^0.1.6"
},
"private": true
}
回答1:
You're probably using an old version of the Firebase CLI. --inspect-functions
wasn't added until recently in version 7.11.0, so you should update:
npm install -g firebase-tools
来源:https://stackoverflow.com/questions/60493134/error-unknown-option-inspect-functions-return-when-adding-inspect-functio