error: unknown option '--inspect-functions' return when adding --inspect-functions to firebase emulators:start

假装没事ソ 提交于 2020-03-26 04:03:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!