Search code examples
node.jsazureazure-devopsazure-active-directorynode-java

Azure DevOps - npm install failure and downgrade python version


I am a newbie to Azure and developing an nodejs application that interacts with some java class. I'm using node-java module to implement it. Everything worked well in the local but when I try to deploy my changes on Azure, the pipeline has an exception while executing npm install.

Problem The error happens while executing node-gyp rebuild so, the postInstall for node-java is failing.

Solution I've got the solution that I need to downgrade the python version to 2.x.

Question I'm not sure how to downgrade the package on Azure DevOps?

I've attached a screenshot for your reference,

enter image description here

Any help much appreciated!


Solution

  • Found it!

    I need to edit my existing build pipeline and add a task with python 2.x version.

    Pipeline -> Edit -> Plus Icon on Agent Job -> Select Python Version -> Use 2.x.