使用VSCode调试本地firebase函数 - 无法确定NodeJS版本?

时间:2017-12-09 20:42:00

标签: node.js typescript firebase visual-studio-code google-cloud-functions

当我在powershell中运行firebase服务并尝试使用visual studio代码附加到它时,我在VSCode中收到错误说:

  

"请求'评估'因为Node.js没有响应而被取消了#34;

调试控制台输出:

  

使用旧版协议进行调试,因为Node.js版本不可能   确定(错误:连接ECONNREFUSED 127.0.0.1:5001)

这是我的启动json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
      {
        "name": "Debug Function",
        "type": "node",
        "request": "attach",
        "port": 5001
      }
    ]
}

可能有用的东西,但我不确定搜索它会给我带来相互矛盾的结果,当我跑步时

firebase serve --only functions,hosting

我在控制台输出中遇到错误:

  

警告:您仅使用Node.js v8.9.1,但仅使用Google Cloud Functions   支持v6.11.5。

如果我使用VSCode尝试使用上述配置进行连接,我会在调试控制台中收到以下错误:

  

使用旧版协议进行调试,因为Node.js版本不可能   确定(错误:超时)

不确定如何处理此

0 个答案:

没有答案