Cannot find bower packages

Agent Zebra picture Agent Zebra · May 21, 2015 · Viewed 7.8k times · Source

I installed Yeoman on snow leopard OSX 6.8. When I run 'grunt serve' I get the following error (it can't find my bower packages):

Dream-2:app1 goldenheart$ grunt serve
Running "serve" task

Running "clean:server" (clean) task
>> 1 path cleaned.

Running "wiredep:app" (wiredep) task
Warning: Error: Cannot find where you keep your Bower packages. Use --force to continue.

Aborted due to warnings.


Execution Time (2015-05-21 00:17:32 UTC)
loading tasks   2.3s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 92%
wiredep:app    187ms  ▇▇▇▇▇▇▇ 8%
Total 2.5s

I tried a number of things suggested on other stackoverflow posts, such as installing bower and grunt locally but I'm still getting the above error.

Answer

Laurent picture Laurent · May 21, 2015

You can add a .bowerrc file in the root of your project. In that file, you can define where bower need to install its packages. Add this into that file:

{
  "directory": "... your location ..."
}