Bower Issue: bower_components not created

Do you have a .bowerrc file in your project root?

if not you should create one and than you can follow the tutorial on:

bower.io

if you have this config file could you post it to your question :)


simple steps to get bower_component folder in your application:

1) first create .bowerrc file in root of your app. (just like another file is there = , .gitignor or .sailsrc etc).

2)In .bowerrc file , specify the directory where you want you bower_component folder.see below

{
  "directory" : "assets/bower_components"
}

3) then run bower install .

it checks the .bowerrc file to get directory and create bower_component folder.

Hope it helps :)


I'm not sure about the other answer in here (including .bowerrc)...

This issue also happens when a resource is not available, or the link/mirror to it is down.

For example, I got the following error today:

bower closure-compiler#*                progress Receiving objects:  17% (202/1158), 3.82 MiB | 281.00 KiB/s
bower closure-compiler#*                progress Receiving objects:  17% (202/1158), 4.03 MiB | 264.00 KiB/s
bower closure-compiler#*                progress Receiving objects:  17% (203/1158), 4.14 MiB | 266.00 KiB/s
bower closure-compiler#*                progress Receiving objects:  17% (205/1158), 4.36 MiB | 258.00 KiB/s
bower closure-compiler#*                progress Receiving objects:  17% (205/1158), 4.81 MiB | 260.00 KiB/s
bower leaflet#*                            EHTTP Status code of 404

Which tells me that leaflet (a 3rd-party maps library I am using) is not available. And sure enough, the leaflet resource I was pointing to at the time was not available. In this case I should refer to my bower.json file, not the .bowerrc file, and check for the entry/configuration I am using for whatever resource was giving me a 404 (in this case leaflet).

Concerning the OP's comment:

No bower_components folder is created and so I get errors when referencing the bower packages.

This is because the bower install command works (or seems to work) like a transaction in that if one part fails, the whole install fails... so if you didn't have a bower_components directory before, it would not create one for you if the install failed.