Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 从appharbor build运行bower_Node.js_Msbuild_Bower_Appharbor - Fatal编程技术网

Node.js 从appharbor build运行bower

Node.js 从appharbor build运行bower,node.js,msbuild,bower,appharbor,Node.js,Msbuild,Bower,Appharbor,我在网上搜索过,但找不到任何东西来解决我的问题。我正在尝试将一个WebApp部署到AppHarbor,并执行一些额外的任务,但在构建时遇到了一个问题 <Target Name="NpmBuild"> <!--This part runs OK as AppHarbor machine has node installed--> <Exec Command="npm install" /> <Exec Command="npm insta

我在网上搜索过,但找不到任何东西来解决我的问题。我正在尝试将一个WebApp部署到AppHarbor,并执行一些额外的任务,但在构建时遇到了一个问题

 <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>

我编辑了如上所示的.csproj文件,以便为我的项目的前端构建运行一些任务,其中安装了npm,然后是bower/gulp。之后,当它尝试运行“bower安装”时,会显示以下错误:

ENOGIT git未安装或不在路径中

可以识别bower命令,但可能在AppHarbor为应用程序提供的计算机上没有安装git

我的问题是:

有没有办法在AppHarbor机器中安装git(或访问它)?如果已经安装了,我如何检查它或让bower工作?

我使用了'git init'使它工作
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>
我使用了'git init'使其工作