如何在私有代理64位中运行npm和Gulp?

时间:2018-06-06 10:34:20

标签: azure-devops npm-install azure-pipelines

我有节点模块类型应用程序动态想要在Azure应用服务器中部署。但我的节点模块在VSTS托管代理中运行,这是32位架构,Azure应用服务器是64位架构。所以我得到的问题版本兼容性当我在Azure中的应用程序服务器中运行时,错误%1不是有效的win32应用程序。所以我计划使用64位版本设置私有代理并使用npm plugin设置构建定义。但是,npm需要很长时间才能安装然后在VSTS私有代理上失败并且连接超时错误。在失败后大约40分钟运行以下错误。请看下面的错误:

错误:

2018-06-06T09:45:41.1967771Z ##[section]Starting: npm install 
2018-06-06T09:45:41.2127835Z ==============================================================================
2018-06-06T09:45:41.2127835Z Task         : npm
2018-06-06T09:45:41.2127835Z Description  : Run an npm command
2018-06-06T09:45:41.2127835Z Version      : 0.2.22
2018-06-06T09:45:41.2127835Z Author       : Microsoft Corporation
2018-06-06T09:45:41.2127835Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613746)
2018-06-06T09:45:41.2137839Z ==============================================================================
2018-06-06T09:45:42.9394269Z [command]C:\Program Files\nodejs\npm.cmd config list
2018-06-06T09:45:46.9245395Z ; cli configs
2018-06-06T09:45:46.9245395Z metrics-registry = "https://registry.npmjs.org/"
2018-06-06T09:45:46.9245395Z scope = ""
2018-06-06T09:45:46.9245395Z user-agent = "npm/5.6.0 node/v8.11.2 win32 x64"
2018-06-06T09:45:46.9245395Z 
2018-06-06T09:45:46.9245395Z ; builtin config undefined
2018-06-06T09:45:46.9245395Z prefix = "C:\\Windows\\ServiceProfiles\\NetworkService\\AppData\\Roaming\\npm"
2018-06-06T09:45:46.9245395Z 
2018-06-06T09:45:46.9245395Z ; node bin location = C:\Program Files\nodejs\node.exe
2018-06-06T09:45:46.9245395Z ; cwd = C:\vsts-agent-win-x64-2.129.1\_work\4\s
2018-06-06T09:45:46.9245395Z ; HOME = C:\Windows\ServiceProfiles\NetworkService
2018-06-06T09:45:46.9245395Z ; "npm config ls -l" to show all defaults.
2018-06-06T09:45:46.9245395Z 
2018-06-06T09:45:46.9255399Z [command]C:\Program Files\nodejs\npm.cmd install
2018-06-06T10:23:34.9771623Z npm ERR! code ETIMEDOUT
2018-06-06T10:23:34.9771623Z npm ERR! errno ETIMEDOUT
2018-06-06T10:23:34.9771623Z npm ERR! network request to https://registry.npmjs.org/angular-material failed, reason: connect ETIMEDOUT 104.18.96.96:443
2018-06-06T10:23:34.9771623Z npm ERR! network This is a problem related to network connectivity.
2018-06-06T10:23:34.9771623Z npm ERR! network In most cases you are behind a proxy or have bad network settings.
2018-06-06T10:23:34.9771623Z npm ERR! network 
2018-06-06T10:23:34.9771623Z npm ERR! network If you are behind a proxy, please make sure that the
2018-06-06T10:23:34.9771623Z npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
2018-06-06T10:23:35.0239626Z 
2018-06-06T10:23:35.0239626Z npm ERR! A complete log of this run can be found in:
2018-06-06T10:23:35.0239626Z npm ERR!     C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\npm-cache\_logs\2018-06-06T10_23_34_976Z-debug.log
2018-06-06T10:23:35.0269629Z ##[error]npm failed with error: C:\Program Files\nodejs\npm.cmd failed with return code: 1
2018-06-06T10:23:35.0309633Z ##[section]Finishing: npm install 

0 个答案:

没有答案