Reputation: 467
I've searched on the web but couldn't find anything to fix my particular problem. I'm trying to deploy a WebApp to AppHarbor with some additional tasks but got a issue on build.
<Target Name="NpmBuild"> <!--This part runs OK as AppHarbor machine has node installed-->
<Exec Command="npm install" />
<Exec Command="npm install bower -g" />
<Exec Command="npm install gulp -g" />
<Message Text="Npm Build Finished" />
</Target>
<Target Name="BowerBuild"> <!--This part fails because bower can't find Git-->
<Exec Command="%USERPROFILE%\AppData\Roaming\npm\bower.cmd install" />
<Exec Command="%USERPROFILE%\AppData\Roaming\npm\bower.cmd cache clean" />
<Exec Command="%USERPROFILE%\AppData\Roaming\npm\bower.cmd update" />
<Message Text="Bower Build Finished" />
</Target>
I edited the .csproj file as displayed above to run some tasks for the front-end build for my project where it installs npm then bower/gulp. Afterwards when it tries to run 'bower install' it displays this error:
ENOGIT git is not installed or not in the PATH
The bower command is recognized but probably git is not installed on the machine that AppHarbor provides for the application.
My questions are:
Is there a way to install git in a AppHarbor machine (or access it)? If it is already installed how can i check it or get bower to work?
Upvotes: 1
Views: 199
Reputation: 1931
I have used `git init` to make it works
<Target Name="NpmBuild"> <!--This part runs OK as AppHarbor machine has node installed-->
<Exec Command="git init" />
<Exec Command="npm install" />
<Exec Command="npm install bower -g" />
<Exec Command="npm install gulp -g" />
<Message Text="Npm Build Finished" />
</Target>
<Target Name="BowerBuild"> <!--This part fails because bower can't find Git-->
<Exec Command="%USERPROFILE%\AppData\Roaming\npm\bower.cmd install" />
<Exec Command="%USERPROFILE%\AppData\Roaming\npm\bower.cmd cache clean" />
<Exec Command="%USERPROFILE%\AppData\Roaming\npm\bower.cmd update" />
<Message Text="Bower Build Finished" />
</Target>
Upvotes: 0