Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

running bower from TeamCity (Windows)

I've got a set of build steps in a project (Team City 9.0c)

One of them is running bower install which is a simple command line execution with no parameters.

Bower is installed on the system (I can run it just fine from the command prompt on the machine) but I get the following error

[10:47:35][Step 2/7] Starting: D:\TeamCity\buildAgent\temp\agentTmp\custom_script8385462966123630321.cmd [10:47:35][Step 2/7] in directory: D:\TeamCity\buildAgent\work\5d43cd6017ab83d4\website\Amaze.Web [10:47:37][Step 2/7] 'bower' is not recognized as an internal or external command, [10:47:37][Step 2/7] operable program or batch file. [10:47:37][Step 2/7] Process exited with code 1 [10:47:37][Step 2/7] Step Bower (Command Line) failed

I've seen this before where PATH is not set to the location of the npm binaries in c:\users\xxxx\roaming\... so the TC user cannot find them, however PATH is correct.

Both npm and grunt work successfully. What could be causing this?

like image 776
mpaton Avatar asked Nov 10 '22 16:11

mpaton


1 Answers

Is the path variable defined a user variable? If so, it should be a system variable which will be used by the TeamCity process.

like image 181
infojolt Avatar answered Nov 15 '22 08:11

infojolt