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/[email protected]/dist/js/tether.min.js"></script>
<script src="https://npmcdn.com/[email protected]/dist/js/bootstrap.min.js"></script>
If you're using Webpack:
- Set up bootstrap-loader as described in docs;
- Install tether.js via npm;
- 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 imports
import tether from 'tether';
global.Tether = tether;
// require
global.Tether = require('tether');