Uncaught TypeError: $(...).once is not a function

Created on 22 October 2023, 11 months ago
Updated 23 October 2023, 11 months ago

Hello,

(on D10.1.5)
In my browser, with no extension, I have a message in the console: "Uncaught TypeError: $(...).once is not a function" bla bla bla.
Here is my subtheme.librairies.yml

global-styling:
  version: VERSION
  js:
    js/global.js: {}
    js/HideMenuOnScroll.js: {}
  css:
    component:
      css/style.css: { weight: 10 }
      css/all.min.css: {}
  dependencies:
    - core/jquery
    - core/once
    - core/drupal
bootstrap:
  js:
    /libraries/bootstrap/dist/js/bootstrap.bundle.min.js: { minified: true }
  css:
    component:
      /libraries/bootstrap/dist/css/bootstrap.min.css: {}
bootstrap_cdn:
  js:
    //cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js: { type: external, minified: true }
  css:
    component:
      //cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css: { type: external, minified: true }
maintenance_page:
  version: VERSION
  css:
    theme:
      css/maintenance-page.css: {}
  dependencies:
    - system/maintenance
tree_nation_co2neutral_label_tracker:
  js:
    'https://widgets.tree-nation.com/js/widgets/v1/widgets.min.js?v=1.0': { type: external, minified: true }
tree_nation_co2neutral_label:
  js:
    js/WidgetTreeNation.js: { }
  dependencies:
    - core/drupal
    - publicitem_bar/tree_nation_co2neutral_label_tracker

I thought it was enough, the changes I had made with jQuery, but no, I have miss somethings.

Thanks for your help.

💬 Support request
Status

Fixed

Version

5.5

Component

User interface

Created by

🇫🇷France floown

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024