![](/img/trans.png)
[英]Selfhosted Azure DevOps Agent as NetworkService npm Install problem
[英]Selfhosted Azure DevOps Agent running as NetworkService not able to complete npm install and npm build
在将 windows 平台与 Microsoft 和自托管代理一起使用时,代理无法为 react 项目构建和生成构建文件夹,但在 ubuntu 上运行良好。
这是带有 Microsoft 代理的 linux yml 文件
https://gist.github.com/yogeswaran-gnrgy/0354d455e6c85d387281eb75d1a326f1
这是带有 Microsoft 代理的 windows yml 文件
https://gist.github.com/yogeswaran-gnrgy/816b9f06dbe0039c07ad1293d2fce141
这是使用 Microsoft 代理https://gist.github.com/yogeswaran-gnrgy/acbc3c2a268ea3b514cc423726b0a751在构建步骤中生成的日志
对于自托管代理,它同时安装了 npm 和节点。 可能是什么问题
在 Linux 中
- script: |
echo Executing install
npm install
echo Executing build
npm run build
displayName: 'Building the project'
当用作脚本时, npm install 和 npm build 只能在 Linux 中正常工作。 对于windows,它必须像
- task: Npm@1
displayName: 'Installing dependencies'
inputs:
verbose: false
customCommand: install
- task: Npm@1
displayName: 'Building the project'
inputs:
command: custom
verbose: false
customCommand: run build
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.