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

Incompatible jQuery version error from Bootstrap #1149

Closed
brylie opened this issue Jun 14, 2016 · 10 comments
Closed

Incompatible jQuery version error from Bootstrap #1149

brylie opened this issue Jun 14, 2016 · 10 comments
Assignees
Labels

Comments

@brylie
Copy link
Contributor

brylie commented Jun 14, 2016

We recently added the datatables npm dependency to our project. Datatables requires jQuery > 1.x.x, and as a result, npm is installing jQuery latest (version 3.x). This causes a compatibility issue with Bootstrap.

Limit the maximum jQuery version to prior to 3.0.0.

Output

$ npm install
...
datatables@1.10.12 node_modules/datatables
└── jquery@3.0.0
...

Related error(s)

bootstrap.js:15 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

There is a second error related to jQuery, which may or may not be related to this issue:

settingsWizard.js:57 Uncaught TypeError: $(...).carousel is not a function
@brylie brylie added this to the Sprint 24 milestone Jun 14, 2016
@brylie brylie self-assigned this Jun 14, 2016
@jykae
Copy link
Contributor

jykae commented Jun 14, 2016

@brylie what is the actual error this fixes? I assigned to review #1150

@brylie
Copy link
Contributor Author

brylie commented Jun 15, 2016

@philippeluickx can you please help verify the error? I am having trouble reproducing on my laptop.

@brylie
Copy link
Contributor Author

brylie commented Jun 15, 2016

@jykae I have updated the issue with error message(s).

@brylie
Copy link
Contributor Author

brylie commented Jun 15, 2016

We just ran a second test on a fresh install. Switching the jQuery version to be < 3.0.0 resolves both errors in the task description.

@brylie
Copy link
Contributor Author

brylie commented Jun 15, 2016

Ping @bajiat.

@55
Copy link
Contributor

55 commented Jun 15, 2016

Still getting this error in develop:

bootstrap.js:15 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3(anonymous function) @ bootstrap.js:15(anonymous function) @ bootstrap.js:17(anonymous function) @ twbs_bootstrap.js?hash=dc805bf…:2394(anonymous function) @ twbs_bootstrap.js?hash=dc805bf…:2401

app.js?hash=5ecf35e…:8050 Uncaught TypeError: $(...).carousel is not a functionclickNext @ app.js?hash=5ecf35e…:8050(anonymous function) @ template.js:496Template._withTemplateInstanceFunc @ template.js:465(anonymous function) @ template.js:495(anonymous function) @ view.js:884Blaze._withCurrentView @ view.js:538(anonymous function) @ view.js:883(anonymous function) @ events.js:47dispatch @ jquery.js:5087elemData.handle @ jquery.js:4895

@55 55 reopened this Jun 15, 2016
@philippeluickx
Copy link
Contributor

@NNN that's the error I was having.
Also, might be a good idea to comment any limits to version numbers, so we know that we need to keep an eye on this when we update to bootstrap v4 (that should support jquery 3)

@brylie
Copy link
Contributor Author

brylie commented Jun 15, 2016

@NNN you might need to re-run npm install after pulling changes from develop. I.e. your development directory might still have jQuery 3.0.0 from the previous time you ran npm install.

@bajiat bajiat added the backlog label Jun 16, 2016
@jykae
Copy link
Contributor

jykae commented Jun 23, 2016

@NNN Can this be closed? Is it fixed for you?

@bajiat bajiat modified the milestones: Sprint 25, Sprint 24 Jun 28, 2016
@55
Copy link
Contributor

55 commented Jul 1, 2016

Yes, it's fixed.
Tested in the latest develop.
No errors even after meteor reset.

@55 55 closed this as completed Jul 1, 2016
@55 55 removed the backlog label Jul 1, 2016
@brylie brylie mentioned this issue Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants