[Solved-4 Solutions] Error: Bootstrap tooltips require Tether



Error Description:

    • When using Bootstrap V4 the following error is logged in the console;

    Error: Bootstrap tooltips require Tether

    Solution 1:

      • Bootstrap 4 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>
      
      click below button to copy the code. By - JavaScript tutorial - team

      Solution 2:

        • If you are using npm and browserify:
        // es6 imports
        import tether from 'tether';
        global.Tether = tether;
        
        // require
        global.Tether = require('tether');
        
        
        click below button to copy the code. By - JavaScript tutorial - team

        Solution 3:

          • 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'
                  })
              ]
          
          click below button to copy the code. By - JavaScript tutorial - team

          Solution 4:

            • Add bellow source into Gemfile
            source 'https://rails-assets.org' do
              gem 'rails-assets-tether', '>= 1.1.0'
            end
            
            click below button to copy the code. By - JavaScript tutorial - team
            • Run command:
            bundle install
            
            click below button to copy the code. By - JavaScript tutorial - team
            • Add this line after jQuery in application.js.
            //= require jquery
            //= require tether
            
            click below button to copy the code. By - JavaScript tutorial - team
            • Restart rails server.

            Related Searches to Error: Bootstrap tooltips require Tether