Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The json generated file won't be accept by "bower install" #176

Open
phuongnd08 opened this issue Nov 14, 2015 · 3 comments
Open

The json generated file won't be accept by "bower install" #176

phuongnd08 opened this issue Nov 14, 2015 · 3 comments

Comments

@phuongnd08
Copy link

I run bower install with this bower.json (generated by bower-rails):

{
  "lib": {
    "name": "bower-rails generated lib assets",
    "dependencies": {
      "angular-ui-router": "~0.2.15",
      "angular-bootstrap": "~0.14.3"
    }
  },
  "vendor": {
    "name": "bower-rails generated vendor assets",
    "dependencies": {
    }
  }
}

Here what's bower say:

bower                         EINVALID Failed to read /Users/user/app/bower.json

Additional error details:
No name property set
@wjdhamilton
Copy link

👍 Me too, running Rails 4.2 on Windows 7

@jekuno
Copy link

jekuno commented Jan 20, 2016

👍

Workaround: In order to install all bower components into only one certain directory strip down the bower.json to:

{
    "name": "bower-rails generated vendor assets",
    "dependencies": {
    }
}

and add a .bowerrc file at project root with e.g. the following content:

{
  "directory" : "vendor/assets/bower_components"
}

@davidalejandroaguilar
Copy link

Just ran into this, thanks @jekuno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants