I need to install agentkeepalive in azure functions. I was able to install other packages an hour ago. But as soon as I tried to install agentkeepalive, it doesn't honour any npm install command nor return any error messages in the console.
CodePudding user response:
In the Azure App Service Editor, the latest version will be 6.14.*
because in app services the latest node version is 14v and the node.js 14 LTS npm latest version is 6.14.*
. So though you try installing the latest version the npm still remains 6.14.*
.
To install the npm install -g [email protected]
, it needs more than {"node":">= 8.0.0"}
.
For doing that you need to update few settings from the Azure portal >
<your-function-app> >
configuration
> settings
tab from left pane. Below are the settings :
Name : `WEBSITE_NODE_DEFAULT_VERSION`
Value : 14.15.0
Name : `WEBSITE_RUN_FROM_PACKAGE`
Value : 0 [If published functions already]
Name : `FUNCTIONS_EXTENSION_VERSION`
Value : beta [optional]
Even if you update npm to the latest version, it will stay to the last version release i.e., 6.14.*
Also, try changing your node version in your Azure App service for getting compatible error-free npm versions upgrade.
Below are the references for the NPM-Node Compatibility release versions to Azure App Services (Editor - Preview).
REFERENCES :