Search code examples
azure-functionspostmannewman

How to run an command installed through NPM in Azure Function


I have a simple Azure Function written in c#, it calls newman, a tool installed through NPM. it works fine locally, but newman is not recognized after deploying to Azure. I installed newman from Kudu console, and I can run newman from Kudu console without any problem, not not when I call it from Azure function:

'newman' is not recognized as an internal or external command,


Solution

  • Would'nt it be better if you write the azure-function in node so that you can directly make use of the npm runner ?

    But never mind a quick search landed me on this blog the guy has an generic example for running npm scripts from c# app.

    Also both of these stackoverflow answers do help too

    https://stackoverflow.com/a/55583148/8368871

    https://stackoverflow.com/a/55603821/8368871