Skip to content

Commit 5a112f5

Browse files
Merge pull request #225618 from lilyjma/patch-11
Azure Functions now supports Node 18
2 parents d1e6345 + 69cb952 commit 5a112f5

7 files changed

+18
-19
lines changed

articles/azure-functions/create-first-function-cli-node.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Before you begin, you must have the following:
3131

3232
+ The Azure [Az PowerShell module](/powershell/azure/install-az-ps) version 5.9.0 or later.
3333

34-
+ [Node.js](https://nodejs.org/) version 16 or 18 (preview).
34+
+ [Node.js](https://nodejs.org/) version 18 or 16.
3535

3636
### Prerequisite check
3737

@@ -110,18 +110,18 @@ Each binding requires a direction, a type, and a unique name. The HTTP trigger h
110110
# [Azure CLI](#tab/azure-cli)
111111

112112
```azurecli
113-
az functionapp create --resource-group AzureFunctionsQuickstart-rg --consumption-plan-location <REGION> --runtime node --runtime-version 14 --functions-version 4 --name <APP_NAME> --storage-account <STORAGE_NAME>
113+
az functionapp create --resource-group AzureFunctionsQuickstart-rg --consumption-plan-location <REGION> --runtime node --runtime-version 18 --functions-version 4 --name <APP_NAME> --storage-account <STORAGE_NAME>
114114
```
115115

116-
The [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command creates the function app in Azure. If you're using Node.js 16, also change `--runtime-version` to `16`.
116+
The [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command creates the function app in Azure. It is recommended that you use the latest version of Node.js, which is currently 18. You can specify the version by setting `--runtime-version` to `18`.
117117

118118
# [Azure PowerShell](#tab/azure-powershell)
119119

120120
```azurepowershell
121-
New-AzFunctionApp -Name <APP_NAME> -ResourceGroupName AzureFunctionsQuickstart-rg -StorageAccount <STORAGE_NAME> -Runtime node -RuntimeVersion 14 -FunctionsVersion 4 -Location <REGION>
121+
New-AzFunctionApp -Name <APP_NAME> -ResourceGroupName AzureFunctionsQuickstart-rg -StorageAccount <STORAGE_NAME> -Runtime node -RuntimeVersion 18 -FunctionsVersion 4 -Location <REGION>
122122
```
123123

124-
The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdlet creates the function app in Azure. If you're using Node.js 16, change `-RuntimeVersion` to `16`.
124+
The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdlet creates the function app in Azure. It is recommended that you use the latest version of Node.js, which is currently 18. You can specify the version by setting `--runtime-version` to `18`.
125125

126126
---
127127

articles/azure-functions/create-first-function-cli-typescript.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Before you begin, you must have the following:
3131

3232
+ The Azure [Az PowerShell module](/powershell/azure/install-az-ps) version 5.9.0 or later.
3333

34-
+ [Node.js](https://nodejs.org/) version 14 or 16 (preview).
34+
+ [Node.js](https://nodejs.org/) version 18 or 16.
3535

3636
### Prerequisite check
3737

@@ -143,19 +143,18 @@ Each binding requires a direction, a type, and a unique name. The HTTP trigger h
143143
# [Azure CLI](#tab/azure-cli)
144144

145145
```azurecli
146-
az functionapp create --resource-group AzureFunctionsQuickstart-rg --consumption-plan-location <REGION> --runtime node --runtime-version 14 --functions-version 4 --name <APP_NAME> --storage-account <STORAGE_NAME>
146+
az functionapp create --resource-group AzureFunctionsQuickstart-rg --consumption-plan-location <REGION> --runtime node --runtime-version 18 --functions-version 4 --name <APP_NAME> --storage-account <STORAGE_NAME>
147147
```
148148

149-
The [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command creates the function app in Azure. If you're using Node.js 16, also change `--runtime-version` to `16`.
149+
The [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command creates the function app in Azure. It is recommended that you use the latest version of Node.js, which is currently 18. You can specify the version by setting `--runtime-version` to `18`.
150150

151151
# [Azure PowerShell](#tab/azure-powershell)
152152

153153
```azurepowershell
154-
New-AzFunctionApp -Name <APP_NAME> -ResourceGroupName AzureFunctionsQuickstart-rg -StorageAccount <STORAGE_NAME> -Runtime node -RuntimeVersion 14 -FunctionsVersion 4 -Location '<REGION>'
154+
New-AzFunctionApp -Name <APP_NAME> -ResourceGroupName AzureFunctionsQuickstart-rg -StorageAccount <STORAGE_NAME> -Runtime node -RuntimeVersion 18 -FunctionsVersion 4 -Location '<REGION>'
155155
```
156156

157-
The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdlet creates the function app in Azure. If you're using Node.js 16, change `-RuntimeVersion` to `16`.
158-
157+
The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdlet creates the function app in Azure. It is recommended that you use the latest version of Node.js, which is currently 18. You can specify the version by setting `--runtime-version` to `18`.
159158
---
160159

161160
In the previous example, replace `<STORAGE_NAME>` with the name of the account you used in the previous step, and replace `<APP_NAME>` with a globally unique name appropriate to you. The `<APP_NAME>` is also the default DNS domain for the function app.

articles/azure-functions/create-first-function-vs-code-typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Before you get started, make sure you have the following requirements in place:
2323

2424
+ An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
2525

26-
+ [Node.js 16.x](https://nodejs.org/en/download/releases/) or [Node.js 18.x](https://nodejs.org/en/download/releases/) (preview). Use the `node --version` command to check your version.
26+
+ [Node.js 18.x](https://nodejs.org/en/download/releases/) or [Node.js 16.x](https://nodejs.org/en/download/releases/). Use the `node --version` command to check your version.
2727

2828
+ [Visual Studio Code](https://code.visualstudio.com/) on one of the [supported platforms](https://code.visualstudio.com/docs/supporting/requirements#_platforms).
2929

articles/azure-functions/functions-app-settings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,11 +587,11 @@ The maximum number of instances that the app can scale out to. Default is no lim
587587
## WEBSITE\_NODE\_DEFAULT_VERSION
588588

589589
_Windows only._
590-
Sets the version of Node.js to use when running your function app on Windows. You should use a tilde (~) to have the runtime use the latest available version of the targeted major version. For example, when set to `~10`, the latest version of Node.js 10 is used. When a major version is targeted with a tilde, you don't have to manually update the minor version.
590+
Sets the version of Node.js to use when running your function app on Windows. You should use a tilde (~) to have the runtime use the latest available version of the targeted major version. For example, when set to `~18`, the latest version of Node.js 18 is used. When a major version is targeted with a tilde, you don't have to manually update the minor version.
591591

592592
|Key|Sample value|
593593
|---|------------|
594-
|WEBSITE\_NODE\_DEFAULT_VERSION|`~10`|
594+
|WEBSITE\_NODE\_DEFAULT_VERSION|`~18`|
595595

596596
## WEBSITE\_OVERRIDE\_STICKY\_DIAGNOSTICS\_SETTINGS
597597

articles/azure-functions/functions-reference-node.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ The following table shows current supported Node.js versions for each major vers
527527

528528
| Functions version | Node version (Windows) | Node Version (Linux) |
529529
|---|---| --- |
530-
| 4.x (recommended) | `~18`(preview)<br/>`~16`<br/>`~14` | `node|18`(preview)<br/>`node|16`<br/>`node|14` |
530+
| 4.x (recommended) | `~18`<br/>`~16`<br/>`~14` | `node|18`<br/>`node|16`<br/>`node|14` |
531531
| 3.x | `~14`<br/>`~12`<br/>`~10` | `node|14`<br/>`node|12`<br/>`node|10` |
532532
| 2.x | `~12`<br/>`~10`<br/>`~8` | `node|10`<br/>`node|8` |
533533
| 1.x | 6.11.2 (locked by the runtime) | n/a |
@@ -538,14 +538,14 @@ You can see the current version that the runtime is using by logging `process.ve
538538

539539
# [Windows](#tab/windows-setting-the-node-version)
540540

541-
For Windows function apps, target the version in Azure by setting the `WEBSITE_NODE_DEFAULT_VERSION` [app setting](functions-how-to-use-azure-function-app-settings.md#settings) to a supported LTS version, such as `~16`.
541+
For Windows function apps, target the version in Azure by setting the `WEBSITE_NODE_DEFAULT_VERSION` [app setting](functions-how-to-use-azure-function-app-settings.md#settings) to a supported LTS version, such as `~18`.
542542

543543
# [Linux](#tab/linux-setting-the-node-version)
544544

545545
For Linux function apps, run the following Azure CLI command to update the Node version.
546546

547547
```azurecli
548-
az functionapp config set --linux-fx-version "node|14" --name "<MY_APP_NAME>" --resource-group "<MY_RESOURCE_GROUP_NAME>"
548+
az functionapp config set --linux-fx-version "node|18" --name "<MY_APP_NAME>" --resource-group "<MY_RESOURCE_GROUP_NAME>"
549549
```
550550

551551
---

includes/functions-requirements-visual-studio-code-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.author: glenga
88

99
+ An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
1010

11-
+ [Node.js 16.x](https://nodejs.org/en/download/releases/) or [Node.js 18.x (preview)](https://nodejs.org/en/download/releases/). Use the `node --version` command to check your version.
11+
+ [Node.js 18.x](https://nodejs.org/en/download/releases/) or [Node.js 16.x](https://nodejs.org/en/download/releases/). Use the `node --version` command to check your version.
1212

1313
+ [Visual Studio Code](https://code.visualstudio.com/) on one of the [supported platforms](https://code.visualstudio.com/docs/supporting/requirements#_platforms).
1414

includes/functions-supported-languages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.custom: include file
1010
|Language |1.x |2.x<sup>1</sup> | 3.x<sup>1</sup> | 4.x |
1111
|-----------------------------------------|------------|---| --- | --- |
1212
|[C#](../articles/azure-functions/functions-dotnet-class-library.md)|GA (.NET Framework 4.8)|GA (.NET Core 2.1)| GA (.NET Core 3.1)<br/> | GA (.NET 6.0)<br/>[GA (.NET 7.0)](../articles/azure-functions/dotnet-isolated-process-guide.md)<br/>[GA (.NET Framework 4.8)](../articles/azure-functions/dotnet-isolated-process-guide.md) |
13-
|[JavaScript](../articles/azure-functions/functions-reference-node.md#node-version)|GA (Node.js 6)|GA (Node.js 10 & 8)| GA (Node.js 14, 12, & 10) | GA (Node.js 14)<br/>GA (Node.js 16)<br/>Preview (Node.js 18) |
13+
|[JavaScript](../articles/azure-functions/functions-reference-node.md#node-version)|GA (Node.js 6)|GA (Node.js 10 & 8)| GA (Node.js 14, 12, & 10) | GA (Node.js 18, 16, & 14) |
1414
|[F#](../articles/azure-functions/functions-reference-fsharp.md)|GA (.NET Framework 4.8)|GA (.NET Core 2.1<sup>1</sup>)| GA (.NET Core 3.1) | GA (.NET 6.0)<br/> GA (.NET 7.0)|
1515
|[Java](../articles/azure-functions/functions-reference-java.md)|N/A|GA (Java 8)| GA (Java 11 & 8)| GA (Java 11 & 8) <br/> GA (Java 17)|
1616
|[PowerShell](../articles/azure-functions/functions-reference-powershell.md) |N/A|N/A|N/A| GA (PowerShell 7.2)|

0 commit comments

Comments
 (0)