Tom*_*han 5 powershell teamcity azure npm teamcity-9.1
我遇到了严重的问题,让我的TeamCity配置的最后部分到位.
我有一个执行以下命令的powershell步骤:
& npm install
& grunt build
记录以下输出:
Build (Powershell) (1s)
[13:18:08]PowerShell Executable: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
[13:18:08]Working directory: C:\BuildAgent\work\6a434ee5d01fd0d9
[13:18:08]PowerShell arguments: [-NonInteractive, -ExecutionPolicy, ByPass, -File, C:\BuildAgent\temp\buildTmp\powershell8407335260182621582.ps1]
[13:18:09]Error: ENOENT, stat 'C:\Windows\system32\config\systemprofile\AppData\Roaming\npm'
[13:18:09]
[13:18:09]grunt-cli: The grunt command line interface. (v0.1.13)
[13:18:09]Process exited with code 0
我已经看到这是一个已知的问题,但迄今为止没有一个解决方案对我有用.
我的设置如下:我在Azure中有两个虚拟机,build和agent.两者都连接到同一个AD域,domain其中有一个用户domain\teamcityuser,他是"标准"类(即不是管理员).此用户同时运行构建服务器(在build实例上)和构建代理(在agent实例上).
我尝试过这些事情没有成功:
domain\teamcityuser具有对其的完全控制访问权限.npm在.下创建目录C:\Users\teamcityuser\AppData\RoamingC:\Windows\System32\config\SystemProfile\.npmrc包含内容的文件prefix=C:\npm-global,以及创建后一个文件夹npm cache clean运行构建之前npm通过安装全局包npm install -g npm我还可以尝试使其工作吗?
为了避免XY问题,这是我的实际问题:
我有一个.NET Web API项目,通过此TeamCity安装,通过Octopus Deploy和托管服务器进行CI设置.我还有一个github repo,其中包含将使用API的Web SPA代码.水疗中心是用grunt build它构建的,之后有一个dist包含我需要部署的所有内容的文件夹.
我想尽可能多地重用CI架构来推出客户端.
鉴于可执行文件的路径包含SysWOW64,这是一个x32 Powershell,因此,它指的是x32系统配置文件路径,它位于C:\Windows\sysWOW64\config\systemprofile.因此,您需要使用该路径作为基础,以实现任何变通方法,例如,创建C:\Windows\sysWOW64\config\systemprofile\AppData\Roaming\npm文件夹,而不是简单C:\Windows\system32\config\systemprofile\AppData\Roaming\npm.
| 归档时间: | 
 | 
| 查看次数: | 1418 次 | 
| 最近记录: |