0

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!

moustacheman
  • 1,424
  • 4
  • 21
  • 47
  • Which build image are you using? Python 2.7.14 is [installed](https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/win/Vs2017-Server2016-Readme.md#python-64-bit) on the VS2017 image. – Matt Jan 15 '19 at 21:43
  • I believe it's 3.6, `gyp ERR! stack Error: Command failed: C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\python.EXE -c import sys; print` – moustacheman Jan 15 '19 at 22:49

1 Answers1

3

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.

moustacheman
  • 1,424
  • 4
  • 21
  • 47