Fix Travis CI stalled builds with EmberJS and Ember CLI

Posted on

Uncaught Error: Assertion Failed: Ember Views require jQuery between 1.7 and 2.1 ember-testing.js:1159
Uncaught TypeError: $ is not a function

Look familiar?

Just recently, jQuery 1.12.x was released to bower, and Ember-CLI’s default blueprint allowed upgrading to this version. Unfortunately, all current versions of Ember have a hardcoded check that will make you have a bad time.

To work around this, replace the jQuery definition in your bower.json with this:

"jquery": "1.11.3"

That’ll get you back in business until there’s a mainline fix. You might also be interested in reading a previous post I wrote about locking down your Bower components.

UPDATE: There’s a PR open to fix this for jQuery 1.12, but if they release 1.13.x you’ll still have a bad time. At this time, I still recommend locking to 1.11.3.

Find an issue?
Open a pull request against my blog on GitHub.
Ben Limmer