How to fix bower ECMDERR

前端 未结 13 2216
执念已碎
执念已碎 2020-11-30 16:30

I\'m using \"yeoman\" and \"bower\" on windows 7 but got the following error when I create the app

yo webapp

The error is

         


        
相关标签:
13条回答
  • 2020-11-30 16:48

    In case you might encounter the same issue...It turns out my machine behind firewall, that won't able to access git://github.com/jquery/jquery.git

    Link: Unable to Connect to GitHub.com For Cloning

    The solution without changing the firewall:

    git config --global url."https://".insteadOf git://
    

    Credit to @bnguyen82 from Unable to Connect to GitHub.com For Cloning and @Sindre Sorhus from Bower install using only https?

    0 讨论(0)
  • 2020-11-30 16:53

    solution provided by Dakkon_jareth works for me, I was not having app/bower_components but library there, I changed that to app/bower_components and started working, I will also recommend to try 2-3 times after NPM Cache clean.

    0 讨论(0)
  • 2020-11-30 16:54

    My bower.json first looked like this:

    {
      "name": "HelloIonic",
      "private": "true",
      "devDependencies": {
        "ionic": "driftyco/ionic-bower#1.3.1",
        "ion-datetime-picker": "katemihalikova/ionic-datetime-picker#0.4.0",    
        "ion-tree-list": "fer/ion-tree-list#0.0.10"                             
      }
    }
    

    and I had the "failed to execute git remote -ls" problem. After I changed it to the following it suddenly started working:

    {
      "name": "HelloIonic",
      "private": true,
      "devDependencies": {
        "ionic": "^1.3.2",
        "ion-datetime-picker": "^0.4.0",
        "ion-tree-list": "^0.0.10"
      },
      "resolutions": {
        "ionic": "^1.0.0-beta.9"
      }
    }
    
    0 讨论(0)
  • I had same problem. After installed "Microsoft .NET Core 1.0.0 RC2 - VS 2015" this fix it.

    0 讨论(0)
  • 2020-11-30 16:55

    You can remove all generators which have and install again. It's will be help.

    0 讨论(0)
  • 2020-11-30 16:57

    To contribute to leoh's answer (since I don't have enough rep to post a comment):

    If, like me, you found that you could not execute the command because git wasn't installed globally on your machine, opening Tools > Options in Visual Studio, then Projects and Solutions > Web Package Management > External Web Tools, you will see that, by default, there are two git locations:

    • $(DevEnvDir)\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd
    • $(DevEnvDir)\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin

    By default (for Visual Studio 2017 Enterprise), these respectively map to:

    • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd
    • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin

    Then open a command prompt (Windows + R > "cmd"), navigate to the above locations, and run leoh's command. I wasn't sure which to run it from, so I ran it from both just in case. The issue was resolved for me from then on.

    0 讨论(0)
提交回复
热议问题