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

No bower.json present when using bower 1.5.x #1893

Closed
jsolis opened this issue Aug 24, 2015 · 4 comments
Closed

No bower.json present when using bower 1.5.x #1893

jsolis opened this issue Aug 24, 2015 · 4 comments

Comments

@jsolis
Copy link

jsolis commented Aug 24, 2015

We have a bunch of projects with the same bower setup.

In the root of the project, there is a .bowerrc file with "cwd" set to "client".

{
  "cwd": "client",
  "directory": "src/bower_components"
}

In the "client" directory we have our bower.json file. We run "bower install" from the root of the project.

We have been using this same set up for over a year in some projects. It seems starting with bower 1.5.0, we started getting the error pasted below.

Downgrading to 1.4.1 fixed the issue. We were also able to replicate this on 5 different machines (4 devs + our build server).

For now we downgraded bower on our build server to 1.4.1 to get around this issue.

bower                           ENOENT No bower.json present

Stack trace:
Error: No bower.json present
    at createError (/Users/jsolis/Sites/m-stay-checkout/node_modules/bower/lib/util/createError.js:4:15)
    at /Users/jsolis/Sites/m-stay-checkout/node_modules/bower/lib/core/Project.js:54:19
From previous event:
    at Project.install (/Users/jsolis/Sites/m-stay-checkout/node_modules/bower/lib/core/Project.js:88:6)
    at install (/Users/jsolis/Sites/m-stay-checkout/node_modules/bower/lib/commands/install.js:26:20)
    at /Users/jsolis/Sites/m-stay-checkout/node_modules/bower/lib/commands/index.js:32:28

Console trace:
Error
    at StandardRenderer.error (/Users/jsolis/Sites/m-stay-checkout/node_modules/bower/lib/renderers/StandardRenderer.js:82:37)
    at Logger.<anonymous> (/Users/jsolis/Sites/m-stay-checkout/node_modules/bower/bin/bower:110:22)
    at Logger.emit (events.js:107:17)
    at Logger.emit (/Users/jsolis/Sites/m-stay-checkout/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
    at /Users/jsolis/Sites/m-stay-checkout/node_modules/bower/lib/commands/index.js:45:20
    at _rejected (/Users/jsolis/Sites/m-stay-checkout/node_modules/bower/node_modules/q/q.js:844:24)
    at /Users/jsolis/Sites/m-stay-checkout/node_modules/bower/node_modules/q/q.js:870:30
    at Promise.when (/Users/jsolis/Sites/m-stay-checkout/node_modules/bower/node_modules/q/q.js:1122:31)
    at Promise.promise.promiseDispatch (/Users/jsolis/Sites/m-stay-checkout/node_modules/bower/node_modules/q/q.js:788:41)
    at /Users/jsolis/Sites/m-stay-checkout/node_modules/bower/node_modules/q/q.js:604:44
System info:
Bower version: 1.5.1
Node version: 0.12.7
OS: Darwin 14.4.0 x64
@sheerun
Copy link
Contributor

sheerun commented Aug 24, 2015

Yes, it's a bug. Sorry about that. I'll push fix soon.

@jsolis
Copy link
Author

jsolis commented Aug 25, 2015

👍 awesome, thanks for the quick reply

@sheerun
Copy link
Contributor

sheerun commented Aug 25, 2015

In 1.5.2 I've reverted auto-running in directory containing bower.json, so it should be fine now..

@sheerun sheerun closed this as completed Aug 25, 2015
@jsolis
Copy link
Author

jsolis commented Aug 25, 2015

🏆 confirmed this works with v 1.5.2 again. Thanks!!

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

No branches or pull requests

2 participants