Denis
Denis

Reputation: 747

npm install in TFS build throws "not found: git"

I installed Git for windows and node.js, they are both on the system's variable "Path" and available.

enter image description here

I have packages.json file in project and there is TFS build step definition to call it like this :

<Target Name="BeforeBuild">
  <Exec Command="npm install" /> 
</Target>

When i go to TFS server and execute "npm install" in my project directory all the packages are set up correctly.

When TFS executes "npm install" during build process i get this error:
EXEC (0, 0)
not found: git

enter image description here

Upvotes: 0

Views: 669

Answers (1)

devduderino
devduderino

Reputation: 71

Ran into the same issue with Bamboo. TFS is running as a service and the service account's PATH may be different than what you're seeing here. If you can , log in to the TFS user's account and adjust the "User Variables" to include you path to Git. The application is likely taking the "user path variable" instead of combining the "user" and "system" paths.

system vars

Upvotes: 2

Related Questions