I've download azure-functions-core-tool@3 and when I run a newly created function project using the Azure Tools it appears to be running v2, though I'm not sure .
The settings.json
file is the following:
{
"azureFunctions.deploySubpath": ".",
"azureFunctions.postDeployTask": "npm install",
"azureFunctions.projectLanguage": "JavaScript",
"azureFunctions.projectRuntime": "~3",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "npm prune"
}
However, when I run the Azure functions with "npm start" or "func start", the header portion reports:
Azure Functions Core Tools (2.7.2184 Commit hash: 5afacc827c2848e4debc23bb96604f1ffce09cc7)
Function Runtime Version: 2.0.12961.0
and later in the log I see:
[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.
which seems to imply that the functions are still running in a 2.0 mode.
How can you determine which version of the runtime is executing?
If you see
Function Runtime Version: 2.0.12961.0
you're running runtime V2.
Run npm install -g azure-functions-core-tools@3
to explicitly install the V3 runtime and you'll be running V3 locally.
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.
More information: Work with Azure Functions Core Tools