如何确定我在本地使用的 Azure Functions 运行时版本?
How do I determine what version of the Azure Function runtime I'm using locally?
我已经下载了 azure-functions-core-tool@3,当我 运行 使用 Azure 工具新创建的功能项目时,它似乎是 运行ning v2,虽然我不是当然。
settings.json
文件如下:
{
"azureFunctions.deploySubpath": ".",
"azureFunctions.postDeployTask": "npm install",
"azureFunctions.projectLanguage": "JavaScript",
"azureFunctions.projectRuntime": "~3",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "npm prune"
}
但是,当我 运行 Azure 使用 "npm start" 或 "func start" 运行时,header 部分报告:
Azure Functions Core Tools (2.7.2184 Commit hash: 5afacc827c2848e4debc23bb96604f1ffce09cc7)
Function Runtime Version: 2.0.12961.0
后来在日志中我看到:
[warn] The Node.js version you are using (v12.17.0) is not fully supported by Azure Functions V2. We recommend using one the following major versions: 8, 10.
这似乎意味着这些功能仍在 运行2.0 模式下。
如何确定 运行time 正在执行哪个版本?
如果你看到
Function Runtime Version: 2.0.12961.0
您是 运行 运行时 V2。
运行 npm install -g azure-functions-core-tools@3
显式安装 V3 运行时,您将在本地 运行 V3。
Version 2.x and 3.x
Version 2.x/3.x of the tools uses the Azure Functions runtime that is built on .NET Core. This version is supported on all platforms .NET Core supports, including Windows, macOS, and Linux.
我已经下载了 azure-functions-core-tool@3,当我 运行 使用 Azure 工具新创建的功能项目时,它似乎是 运行ning v2,虽然我不是当然。
settings.json
文件如下:
{
"azureFunctions.deploySubpath": ".",
"azureFunctions.postDeployTask": "npm install",
"azureFunctions.projectLanguage": "JavaScript",
"azureFunctions.projectRuntime": "~3",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "npm prune"
}
但是,当我 运行 Azure 使用 "npm start" 或 "func start" 运行时,header 部分报告:
Azure Functions Core Tools (2.7.2184 Commit hash: 5afacc827c2848e4debc23bb96604f1ffce09cc7)
Function Runtime Version: 2.0.12961.0
后来在日志中我看到:
[warn] The Node.js version you are using (v12.17.0) is not fully supported by Azure Functions V2. We recommend using one the following major versions: 8, 10.
这似乎意味着这些功能仍在 运行2.0 模式下。
如何确定 运行time 正在执行哪个版本?
如果你看到
Function Runtime Version: 2.0.12961.0
您是 运行 运行时 V2。
运行 npm install -g azure-functions-core-tools@3
显式安装 V3 运行时,您将在本地 运行 V3。
Version 2.x and 3.x
Version 2.x/3.x of the tools uses the Azure Functions runtime that is built on .NET Core. This version is supported on all platforms .NET Core supports, including Windows, macOS, and Linux.