You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Firebase模拟器报错:无法找到ng可执行文件的问题求助

Firebase模拟器报错:无法找到ng可执行文件的问题求助

各位好,我目前在跟着Firebase的Web开发教程操作,到教程的第5步时,我百分百确认自己严格按步骤执行,但还是一直遇到“找不到ng可执行文件”的报错。

我特意测试了ng命令,确认它已经成功安装在本地环境里,但问题依然存在。以下是我的firebase.json配置内容:

{
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "hosting": [
    {
      "target": "friendlychat",
      "source": ".",
      "ignore": [
        "firebase.json",
        "**/.*",
        "**/node_modules/**"
      ],
      "frameworksBackend": {
        "region": "us-central1"
      }
    },
    {
      "target": "friendlychat",
      "source": ".",
      "frameworksBackend": {}
    }
  ],
  "storage": {
    "rules": "storage.rules"
  },
  "emulators": {
    "auth": {
      "port": 9099
    },
    "functions": {
      "port": 5001
    },
    "firestore": {
      "port": 8080
    },
    "hosting": {
      "port": 5000
    },
    "storage": {
      "port": 9199
    },
    "ui": {
      "enabled": true
    },
    "singleProjectMode": true
  },
  "functions": [
    {
      "source": "functions",
      "codebase": "default",
      "ignore": [
        "node_modules",
        ".git",
        "firebase-debug.log",
        "firebase-debug.*.log"
      ],
      "predeploy": [
        "npm --prefix \"$RESOURCE_DIR\" run lint"
      ]
    }
  ]
}

有没有朋友遇到过类似的问题?麻烦帮忙排查下问题所在,谢谢大家!

备注:内容来源于stack exchange,提问作者VN-Boy

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 08:54:52