apache/hadoop · error · Error
Popover requires tooltip.js
Error message
Popover requires tooltip.js
What it means
The Popover plugin in bootstrap.js extends the Tooltip plugin ($.fn.tooltip.Constructor). Right after defining Popover it checks if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') — popover's init delegates to Tooltip.prototype.init and reads $.fn.tooltip.Constructor.DEFAULTS, so tooltip.js must already have registered itself on $.fn.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/bootstrap-3.4.1/js/bootstrap.js:1983
* Bootstrap: popover.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#popovers
* ========================================================================
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
var Popover = function (element, options) {
this.init('popover', element, options)
}
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.4.1'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
// NOTE: POPOVER EXTENDS tooltip.js
// ================================
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
Popover.prototype.constructor = Popover
View on GitHub (pinned to 2add963021)
Solutions
- Load the full bootstrap.js bundle, which embeds tooltip.js before popover.js
- Or include individual plugin files in dependency order: transition.js, tooltip.js, then popover.js
Example fix
<!-- before --> <script src="popover.js"></script> <script src="tooltip.js"></script> <!-- after --> <script src="tooltip.js"></script> <script src="popover.js"></script>
Defensive patterns
Strategy: validation
Validate before calling
if (!$.fn.tooltip) {
// tooltip.js missing: load it (or the full bundle) before using popovers
throw new Error('load tooltip.js before popover.js');
} Type guard
function popoverAvailable() {
return typeof window.jQuery !== 'undefined' && !!$.fn.tooltip;
} Prevention
- Prefer the full bootstrap.js bundle over cherry-picked plugin files
- When using individual files, order them: transition, tooltip, popover
- Watch bundler/tree-shaking configs that drop 'unused' tooltip.js
When it happens
Trigger: Using a custom Bootstrap build where popover.js is included but tooltip.js is missing or loads later; referencing individually downloaded plugin files instead of the full bootstrap.js bundle, in the wrong order.
Common situations: Custom web UI builds that cherry-pick plugins; asset pipelines concatenating files in the wrong order; bundlers/tree-shakers dropping tooltip.js because no direct import references it.
Related errors
- Bootstrap's JavaScript requires jQuery
- `selector` option must be specified when initializing {} on
- {} `template` option must consist of exactly 1 top-level ele
- Bootstrap's JavaScript requires jQuery version 1.9.1 or high
- Aliasmap archive ({tarname}) does not exist
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/79b21855ec041a05.
Report an issue: GitHub.