Check your package.json
or local node version. It may be referring to an older version of node. You'll notice I created a web app using Node 20 but was changed to match the runtime version on my local machine. To fix, make sure your local environment and package.json
is using Node 20.
--
EDIT 2023 Dec 6 Based off your I'm updating my answer. I have verified the following steps do indeed work.
- Set the runtime in either the portal or run
az webapp config set --name <app name> --resource-group <resource group> --linux-fx-version "NODE|20-lts"
. If using PowerShell, use--%
to escape the|
in--linux-fx-version
argument. - Restart the app service either via portal or
az webapp restart --name <app name> --resource-group <resource group>
When you start a new SSH session, you should see the NodeJS version updated upon the start of the session.