Closed maxmechanic closed 9 years ago
It seems very strange that you ended up with the whole bower_components
under the appkit
namespace. Something is really going wrong. You are the second person to report this, so I wonder if there's some gotcha to document.
Can you run find . -name bower_components
in the broccoli-sample-app
directory and tell me whtat it says?
I'd be happy to take a tarball of your broccoli-sample-app
directory to investigate myself. Send it to joliss42@gmail.com (you may have to put in on Dropbox because it's quite large).
I inferred from your comment that Broccoli expects the bower_components
folder to be in the root directory in not in app/
(where bower install
opted to place Bower packages), and when there is a .bowerrc
explicitly configuring the folder at root, the build is successful.
Bower seems to say that the default directory is bower_components/
, but on multiple machines I've had the experience of Bower defaulting the placement of its install folder inside app/
. If this inference/expectation is true, would it be potentially worthwhile to include a .bowerrc
file to ensure deps are where Broccoli expects them?
Can you figure out under which circumstances bower puts the bower_components
directory in app
?
I can't make it happen on my systen, would like to understand what's going on. I'm running Bower 1.2.8 as well, no Bower configuration in ~ or anything.
I don't have a .bowerrc
in ~ and I'm not sure why it's still defaulting that way. There's a mention that it might be related to Yeoman (though I think that's potentially a matter of a .bowerrc file being a part of the scaffolding) and another confirmation of /app/bower_components
as a default as well as maybe some related unintentional weirdness, but nothing I can find in either the yo or bower repos indicating that.
I tried uninstalling and reinstalling Bower, uninstalling Yo and un/re-installing Bower, and blowing away the .bower
cache and un/re-installing. Without a .bowerrc I'm still getting a default install directory inside app/
. I'm not sure if there is something else not getting wiped out that might be from an older version of Bower or something that Yeoman did.
Having a .bowerrc
file seems to mitigate whatever differences -- however they may be coming up.
I'd really prefer not to merge #8, and just figure out what is going on. Something is clearly broken.
Searching the bower repos for app
doesn't yield anything useful either.
I definitely understand hesitation about #8 and debated opening it. My primary advocacy for it at the moment is that if someone does have a .bowerrc
at ~ with app/
as the install directory, that the project .bowerrc
would prevent these issues. That said, a README caveat would serve a similar purpose without enforcing project folder names/structures or more quietly spackling over a potential issue.
I'm still digging. require
ing Bower in the REPL from a local npm install
shows a directory property of 'app/bower_components' on bower.config
, so I'm guessing it's still from some cached resource that isn't ~.bower/
.
Bower has a cache directory in ~/.cache/bower. It doesn't seem like it would make a difference, but on the off chance: Does it help to move it away?
Bower has a cache directory in ~/.cache/bower. It doesn't seem like it would make a difference, but on the off chance: Does it help to move it away?
FWIW, I experienced the same symptoms of having a components
folder created within app
and adding the .bowerrc
file via #8 remedied the issue. Per your suggestion, I wiped out the cache directory in ~/.cache/bower
, updated bower to 1.2.8
as well with still no luck. I'm happy to revert the .bowerrc
and try other approaches.
Can you all get a fresh clone of https://github.com/joliss/broccoli-sample-app, run npm install
(bower install
shouldn't be needed anymore) and let me know if the issue is still there?
It's still installing to an app/
subdirectory. It feels like there has to be something cached we haven't tried clearing. I might open a Bower issue and/or try to take a better look at the source.
I might open a Bower issue and/or try to take a better look at the source.
Sounds great. I was going to open one myself, but I realized I don't have enough information to provide a useful bug report.
I've also been getting this, and managed to figure out the cause in my case. I had a rogue .bowerrc
, not in ~
but in ~/workspace
, where I had checked out broccoli-sample-app
.
Broccoli gets the bower config by calling require('bower-config').read().directory
in tree.js.
bower-config's read()
tries really hard to find a .bowerrc
. It recursively walks from the cwd
up, until it either finds a .bowerrc
or hits /
and, finding no /.bowerrc
, gives up.
Seems like somewhat surprising behavior from bower-config. OTOH, I also have no idea how the offending .bowerrc got here.
I opened an issue on bower: https://github.com/bower/bower/issues/1189
Happened to me as well, could we at least add to the readme?
I have the same problem, and did not understand what is the solution.
Some coworkers installed my new project in their local environments and are also experiencing this issue. One was able to move the project directory and avoid it but for some reason this is not a viable solution for the other who is still experiencing the issue.
For @michaelch and anyone else still experiencing this the only way I was able to get around was removing the dependency on Bower completely. Sad, but will have to do for now.
Closed by #8.
With broccoli-cli installed, cloning the broccoli-sample-app repo and running
broccoli serve
afternpm install
andbower install
throws errors and will not serve the app:It seems to be trying to include those files in addition to the built version of jQuery when doing es6 concatenation/compilation; deleting those folders lets the app build and run as expected.
What is the idiomatic way with Broccoli to exclude these files? Am I missing something else about configuration?
I'm running Node 0.10.26 and Bower 1.2.8 on OS X.