What is causing 'grunt serve' to throw 'No Bower components found'?

落爺英雄遲暮 提交于 2019-11-30 01:10:10
Olga Gnatenko

I had the same issue, here's what worked in my case:

  1. installed ruby and compass (yeoman needs these)
  2. verified that path to Ruby bin folder is added to %PATH%
  3. installed Git
  4. restarted cmd window and ran "bower install" in the app folder

After that, grunt serve command worked perfectly. Note: maybe installing Git and running bower install would suffice in your case.

Confusingly, the grunt-bower-install task that comes with angular-fullstack doesn't install bower components. It doesn't install anything. This error is trying to let you know that it can't find the bower_components directly, so it can't do its thing.

To fix the issue, run bower install.

If you don't have Bower installed, run npm install -g bower first.

I faced the same problem but only did npm install -g bower and then bower install and got grunt serve working.

I did not need to do any of the things mentioned by Olga.

Hope this helps.

npm install -g bower doesn't install bower components, you should run as well bower install to have all bower's components installed and then run grunt serve. It should work fine

Try to do bower install. If its failing saying not able to connect to git then you can change repo pointing location by simply running below command

$ git config --global url.https://github.com/.insteadOf git://github.com/ 

This will ensure that you will be downloaded over https instead of git if its causing orginasation firewall to block it.

In my case, I added sudo for it to work. So, I ran sudo npm install -g bowerand then bower install. grunt serve then worked when I ran it.

The Bower installation requires the packages to be brought from the Git repository, so first you need to install the Git application in your system. You can download it from this link :https://git-scm.com/downloads . Now after your have downloaded it , there may be a chance that the PATH may not be set up, so go to ControlPanel -> System and Security -> System -> Advance System Settings (on the left-hand side), click it, then goto Environment Variables -> System Variables -> PATH , click edit , and write down the following paths :

;C:\Users\admin\AppData\Local\Programs\Git\bin; C:\Users\admin\AppData\Local\Programs\Git\cmd ....Well the above path is where Git was installed in my system, you can crawl to the place in your system where Git was installed and select the paths from the "bin" and "cmd" folder and paste it on the PATH variable.

Now, after the GIT path is setup, you can now type in the command " $ bower install " , this will install all of your bower packages.

Gautham V kidiyoor
npm install -g bower
bower install
grunt serve

worked for me ...

Nina
npm install -g bower
bower install
grunt serve

It's worked too

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!