19

How can I fix the following problem?

aaa@aaa $ bower install bower.json

bower bower.json#*              cached git://github.com/Kalitte/app-states.git#0.6.9
bower bower.json#*            validate 0.6.9 against git://github.com/Kalitte/app-states.git#*
bower webcomponentsjs#~0.5.4    cached git://github.com/Polymer/webcomponentsjs.git#0.5.5
bower webcomponentsjs#~0.5.4  validate 0.5.5 against git://github.com/Polymer/webcomponentsjs.git#~0.5.4
bower                        ENOTFOUND Package App States=bower.json not found

bower ENOTFOUND Package App States=bower.json not found

Celik
  • 2,311
  • 2
  • 32
  • 54

3 Answers3

36

I don't know how or at what point this happened, but it happened to me and if you look inside your bower_components folder there maybe a folder called App States. I deleted this folder and I was able to do an install.

Jerinaw
  • 5,260
  • 7
  • 41
  • 54
4

You have your bower config in bower.json file, right? You don't give the file as argument, it messes like you show.

So, type in the folder that holds the bower.json file only

bower install

That command will find the bower.json for you automatically.

mico
  • 12,730
  • 12
  • 59
  • 99
  • when I type only "bower install", it still gives the same error – Celik Oct 06 '15 at 11:30
  • 1
    I opened new project and install bower again, and problem is gone. what a silly solution, but works :) – Celik Oct 20 '15 at 10:52
  • Maybe you post this as answer and then accept it? That way you can get question in answered mode. – mico Oct 20 '15 at 12:41
  • 1
    It happens that exists a bugged bower module also called "bower.json" (https://libraries.io/bower/bower.json) so if you accidentally type "bower install bower.json" instead of "bower install", it starts installing the "bower.json" module from internet which messes all up, and makes the following "bower install" commands to fail with the OP message. So **the solution is to remove the whole bower_components folder first** and then regenerate it again cleanly with "bower install" as mico says. – drodsou Feb 20 '16 at 11:47
0

In my case, the bower had created "App States" folder and after deleting the folder the error got resolved. After deleting the folder: execute

bower install --allow-root

This should fix the issue.

Invincible
  • 1,418
  • 18
  • 23