Please can anyone assist, it is driving me crazy. There are quite a few answers on here regarding this, however none have them have worked.

Here is my requirejs-config.js file:

var config = {
  paths: {
    "jquery.bootstrap": "js/node_modules/bootstrap/dist/js/bootstrap.bundle.min",
    "lity": "js/node_modules/lity/dist/lity.min",
    "fotorama/fotorama": "fotorama/fotorama"
  shim: {
    "jquery.bootstrap": {
        'deps': ['jquery']
    "lity": {
        'deps': ['jquery']
    'fotorama/fotorama': {
      'deps': ['jquery']

I am developing a custom theme.

This is the error I am facing in the console.

gallery.js:297 Uncaught TypeError: settings.$elementF.fotorama is not a function
    at UiClass.initGallery (gallery.js:297)
    at UiClass.initialize (gallery.js:139)
    at UiClass.initialize (wrapper.js:109)
    at UiClass (class.js:49)
    at main.js:31
    at Object.execCb (require.js:1650)
    at Module.check (require.js:866)
    at Module.<anonymous> (require.js:1113)
    at require.js:132
    at require.js:1156

Can anyone assist, please?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.