-
Notifications
You must be signed in to change notification settings - Fork 28
Conflict with meteor's bundled jquery package #64
Comments
This seems like a big issue that's going to affect to a lot of people that On Wed, Feb 18, 2015 at 6:48 PM, Guillermo Bisheimer <
|
@lorensr, forgot to mention that jquery was still functional, but select2 was not available for JQuery objects selected using $ function inside a template. I'm still testing what's wrong. |
@gbisheimer, does your method of overriding prevent bower from downloading them as well? I'm using a Bower package that has two dependencies: jquery and moment. I see that both folders are being re-created inside local/bower/. |
@adrianmc, this override just prevents meteor-bower from loading your file into the application, but the package is downloaded anyway. As with polymer components, you may need to download them but you are responsible for including those files wherever you need them in your app. |
Given an application that uses multiple packages 3rd party packages, how can you possibly know (without inspecting the source of each package) if multiple bower libraries are being included, each in different versions? I see no difference using @Urigo approach and using |
@gbisheimer I completely agree. |
Same has happened to me. Thanks for the fix. |
+1 Ran into this exact issue. @gbisheimer Thanks for the suggested fix |
👍 You are welcome |
Trying to use font-awesome and bootstrap in my app, I'm trying to install then in my lib folder... so in my folder i have: bower.json {
"name": "myApp",
"version": "0.0.0",
"authors": [
"John Doe <[email protected]>"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"bootstrap-sass-official": "~3.3.4",
"font-awesome": "~4.3.0"
},
"overrides": {
"jquery": {
"main": []
}
},
"private": true
} .bowerrc {
"directory": "bower"
} But meteor-bower keep installing jquery and trying to compile him in my application. Should i but the libs in my public folder? Why he keeps to install full jquery in my folder (including /src)? |
@Urigo Are you not recommending using bower at all with meteor? Or just with angular-meteor? Also I have libraries with jQuery dependency too. This is what I have done to prevent jquery from loading into the app. I can still see that it is downloaded but it does not seem to be interfering with the app in any way I can notice yet.
That is what I have done to prevent interfering dependencies |
bower/bower#1394 seems to provide the facility, but it isn't working from what i can tell. Could it be we have an older version of bower in the package? |
Yes. I don't think we're updating this package, but here's the line to change on a fork if you need it: https://github.com/mquandalle/meteor-bower/blob/master/package.js#L22 |
Actually it is working, though it is downloading it regardless on the logs. The following block just needs to be in the
With the above this should resolve the issue. |
@lorensr, I was having some trouble with jquery extensions after last PR that auto-includes files from referenced packages.
I was using select2, that depends on jquery, and both packages are loaded automatically. As jquery is already included in meteor, there was a conflict between the two.
In order to fix it, I disabled the jquery bower package using overrides:
So, has to be careful checking packages and their dependencies to avoid this kind of conflicts.
The text was updated successfully, but these errors were encountered: