jQuery 3.0 was released yesterday. Oh happy days! Or is it? This morning one of our dev servers stopped working complaining that "indexOf is not a function" deep inside our minified JS code. It took some time to realize that this is because of a weird bower dependency declaration in SignalR (and possibly other libs). SignalR's bower.json specifies the jQuery dependency version as ">=1.6.4". This will of course break with the jQuery 3.0 as it contains loads of breaking changes. 

So how to fix? Open your project's bower.json and add the version of jQuery that you would like to use as a dependency (latest working version for SignalR seems to be 2.2.4). Also add a resolution to your version of jQuery. Example:

{
  "name": "...",
  "version": "...",
  "authors": [],
  "main": "...",
  "license": "...",
    "dependencies": {
        "jquery":  "^2.2.4", 
        ...
    },
  "resolutions": {
            "jquery": "^2.2.4" 
  }
}

Once bower.json is updated, delete your bower_components folder, clear the bower cache (bower cache clean) and run bower install to install everything again. 

There is an issue at SignalR's github page so hopefully this will be fixed for real soon. https://github.com/SignalR/SignalR/issues/3710

Comment