20

I'm building an App using MEAN Stack and trying to scaffold my frontend using yeoman-generator, when I do yo angular it fails to build and ends up in the following

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

Aborted due to warnings.

I'm stuck with this warning. I found a similar question here , but that solution didn't helped me.

Anyhelp will be greatly appreciated.

Community
  • 1
  • 1
Naveen Vijayakumar
  • 219
  • 1
  • 2
  • 9

7 Answers7

19

I got the same error on

grunt serve.

It was solved when i tried

npm install --global yo bower grunt-cli 

npm install -g generator-angular

yo angular

grunt serve

if you get an error:-

Running "wiredep:app" (wiredep) task

Warning: Error: angular is not installed

. Try running bower install

Community
  • 1
  • 1
varna
  • 929
  • 8
  • 12
9

Just run bower install and your code will run.

Aman Jain
  • 2,294
  • 1
  • 16
  • 22
3

For me it seemed to be link with the rights.
I had to manually create the bower_components folder:

mkdir -m 777 client/bower_components   

and run

bower install
Julien Malige
  • 3,295
  • 1
  • 20
  • 39
2

Put .bowerrc file inside of bower.json file directory.

It must be contain :

{
    "directory": "client/bower_components"
}

It may be your problem.

Vahid Moradi
  • 791
  • 7
  • 16
  • 1
    This was my problem, I had set the directory as "bower_components" but it should have been "public/bower_components". I mistakenly thought it was assuming the path to be relative from public but it's relative to the location of your bowerrc. – Eric Soyke Jul 22 '16 at 19:37
1

The Node version seems to be outdated and both the npm and nodejs is not installed globally:

To install globally run the following:

npm install --global yo bower grunt-cli 
npm install -g generator-angular

And start again, it will work for sure.

dubs
  • 6,511
  • 4
  • 19
  • 35
Thamizhselvan
  • 144
  • 1
  • 5
1

I just got the error.

The solution for me was to add the bower_components folder on the root folder even if I did not have bower dependencies yet.

C0ZEN
  • 894
  • 11
  • 41
0

For my AngularJS project I had to run this:

npm install
npm run bower

After that my project ran successfully

NBash
  • 455
  • 3
  • 10