Firebase emulator is stoping with error: Pub/Sub Emulator has exited with code: 1

Firebase emulator is stoping with error: Pub/Sub Emulator has exited with code: 1

Firebase 模拟器正在停止并出现以下错误

!  pubsub: Fatal error occurred:
   Pub/Sub Emulator has exited with code: 1,
   stopping all running emulators

我不知道模拟器发生了什么,尽管我按照 firebase 文档

中的说明正确安装了 java 和节点

这是我的firebase.json

{
  "functions": {
    "predeploy": [
      "npm --prefix \"$RESOURCE_DIR\" run lint"
    ],
    "source": "functions"
  },
  "emulators": {
    "auth": {
      "port": 9099
    },
    "functions": {
      "port": 5001
    },
    "firestore": {
      "port": 8080
    },
    "pubsub": {
      "port": 8085
    },
    "ui": {
      "enabled": true
    }
  }
}

我通过更新 JAVA_HOME 变量修复并重新启动计算机。