How to fix the error; 'Error: Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)' How to fix the error; 'Error: Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)' javascript javascript

How to fix the error; 'Error: Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)'


For Bootstrap 4 stable:

Since beta Bootstrap 4 doesn't depend on Tether but Popper.js. All scripts (must be in this order):

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

See the current documentation for the newest script versions.


Only Bootstrap 4 alpha:

Bootstrap 4 alpha needs Tether, so you need to include tether.min.js before you include bootstrap.min.js, eg.

<script src="https://npmcdn.com/tether@1.2.4/dist/js/tether.min.js"></script><script src="https://npmcdn.com/bootstrap@4.0.0-alpha.5/dist/js/bootstrap.min.js"></script>


If you're using Webpack:

  1. Set up bootstrap-loader as described in docs;
  2. Install tether.js via npm;
  3. Add tether.js to the webpack ProvidePlugin plugin.

webpack.config.js:

plugins: [        <... your plugins here>,        new webpack.ProvidePlugin({            $: "jquery",            jQuery: "jquery",            "window.jQuery": "jquery",            "window.Tether": 'tether'        })    ]

Source


If you are using npm and browserify:

// es6 importsimport tether from 'tether';global.Tether = tether;// requireglobal.Tether = require('tether');