apache/hadoop · error · Error

Bootstrap's JavaScript requires jQuery version 1.9.1 or high

Error message

Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4

What it means

After the jQuery-exists guard, bootstrap.js 3.4.1 string-parses $.fn.jquery and enforces >= 1.9.1 and < 4: the check (major<2 && minor<9) || (1.9.x with patch<1) || (major>3) throws Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4"). Bootstrap 3 relies on jQuery APIs removed in 4 and absent before 1.9.1.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/bootstrap-3.4.1/js/bootstrap.js:15

/*!
 * Bootstrap v3.4.1 (https://getbootstrap.com/)
 * Copyright 2011-2019 Twitter, Inc.
 * Licensed under the MIT license
 */

if (typeof jQuery === 'undefined') {
  throw new Error('Bootstrap\'s JavaScript requires jQuery')
}

+function ($) {
  'use strict';
  var version = $.fn.jquery.split(' ')[0].split('.')
  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
  }
}(jQuery);

/* ========================================================================
 * Bootstrap: transition.js v3.4.1
 * https://getbootstrap.com/docs/3.4/javascript/#transitions
 * ========================================================================
 * Copyright 2011-2019 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */


+function ($) {
  'use strict';

  // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)
  // ============================================================

View on GitHub (pinned to 2add963021)

Solutions

  1. Pin jQuery to a 1.9.1-3.x release (e.g. the 1.12.x/3.x shipped alongside the HDFS webapps)
  2. If jQuery 4 is required, upgrade the UI to Bootstrap 5, which dropped the jQuery dependency
  3. Verify only one jQuery version loads (a late-loading old copy can overwrite $.fn.jquery)

Example fix

<!-- before -->
<script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
<script src="/static/bootstrap-3.4.1/js/bootstrap.js"></script>

<!-- after -->
<script src="/static/jquery-3.6.0.min.js"></script>
<script src="/static/bootstrap-3.4.1/js/bootstrap.js"></script>
Defensive patterns

Strategy: validation

Validate before calling

function jqueryInRange() {
  var v = window.jQuery && $.fn.jquery.split('.').map(Number);
  return !!v && (v[0] > 1 || (v[0] === 1 && (v[1] > 9 || (v[1] === 9 && v[2] >= 1)))) && v[0] <= 3;
}

Prevention

When it happens

Trigger: The page loads jQuery 1.8.x or older, or jQuery 4.x, together with bootstrap.js 3.4.1 — the version comparison is lexicographic per component, so any out-of-range release triggers the throw at script evaluation time.

Common situations: Upgrading the jQuery bundled in web UIs past 3.x while keeping Bootstrap 3; legacy pages pinned to jQuery 1.7/1.8; a second, older jQuery loaded late overwriting window.jQuery/$.fn.jquery.

Related errors


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/ef440a69231b7750. Report an issue: GitHub.