简体   繁体   English

Azure DevOps-npm安装失败并降级python版本

[英]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. 我是Azure的新手,正在开发与某些Java类进行交互的nodejs应用程序。 I'm using node-java module to implement it. 我正在使用node-java模块来实现它。 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 . 一切在本地都运行良好,但是当我尝试在Azure上部署更改时,执行npm install时管道发生异常。

Problem The error happens while executing node-gyp rebuild so, the postInstall for node-java is failing. 问题执行node-gyp rebuild时发生错误,因此, node-java的postInstall失败。

Solution I've got the solution that I need to downgrade the python version to 2.x. 解决方案我已经有了将python版本降级到2.x所需的解决方案。

Question I'm not sure how to downgrade the package on Azure DevOps? 问题我不确定如何在Azure DevOps上降级软件包?

I've attached a screenshot for your reference, 我附上了屏幕截图供您参考,

在此处输入图片说明

Any help much appreciated! 任何帮助,不胜感激!

Found it! 找到了!

I need to edit my existing build pipeline and add a task with python 2.x version. 我需要编辑现有的构建管道并使用python 2.x版本添加任务。

Pipeline -> Edit -> Plus Icon on Agent Job -> Select Python Version -> Use 2.x. 管道->编辑->代理作业上的加号图标->选择Python版本->使用2.x。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM