New to Drupal 8.

I've created a demo theme. The .libraries.yml file is below:

 version: VERSION
   assets/css/font-awesome.css: {}
   assets/css/bootstrap.css: {}
   assets/css/slick.css: {}
   assets/css/bootstrap-datepicker.css: {}
   assets/css/jquery.fancybox.css: {}
   assets/css/theme-color/default-theme.css: {}
   assets/css/style.css: {}
   '//fonts.googleapis.com/css?family=Tangerine': { type: external, minified: true }
   '//fonts.googleapis.com/css?family=Open+Sans': { type: external, minified: true }
   '//fonts.googleapis.com/css?family=Prata': { type: external, minified: true }
  assets/js/jquery.min.js: {}
  assets/js/bootstrap.js: {}
  assets/js/slick.js: {}
  assets/js/waypoints.js: {}
  assets/js/jquery.counterup.js: {}
  assets/js/bootstrap-datepicker.js: {}
  assets/js/jquery.mixitup.js: {}
  assets/js/jquery.fancybox.pack.js: {}
  assets/js/custom.js: {}
   - core/drupalSettings
   - core/jquery
   - core/jquery.once

If I deleted all the .js from this file, I see no errors in the console however, the images, and slideshows etc are not properly rendering.


3 Answers 3


Perhaps your bootstrap requires an older version of jquery, see if you can override it with a version lower than 3 following the instructions from

How do I use a jQuery version different from the default one used by core?


You're loading 2 versions of jquery: assets/js/jquery.min.js: {} - core/jquery

That's most likely your issue. Try removing the assets/js/jquery.min.js entry and flushing your cache. That will mean you're just using Drupal's core jquery which hopefully your plugin should work fine with

  • Thanks. I did the same as you said. in the console, I see there is no such error for JS however, it shows another kind of error Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3 Mar 28, 2019 at 11:36

This shouldn't be an issue in newer versions of Drupal but just in case anyone stumbles upon this like me: After @GiorgosK's answer I changed my

  once('drop-render', '.form-item-field-myfield-value-min', context).each(function () {


  $(once('drop-render', '.form-item-field-myfield-value-min', context)).each(function () {

and it worked beautifully.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.