'jquery.ui (dependency) was not found - Gridstack as component of BootstrapVue

I'm new to BootstrapVue and i try to use Gridstack as an component, but I got the following error:

ERROR  Failed to compile with 1 error                                                                          
This dependency was not found:
* jquery.ui in ./node_modules/gridstack/dist/jq/jquery.ui.touch-punch.js
To install it, you can run: npm install --save jquery.ui

These are my installed dependencies:

"dependencies": {
    "bootstrap": "^4.6.1",
    "bootstrap-vue": "^2.21.2",
    "core-js": "^3.6.5",
    "gridstack": "^5.0.0", ..... (I also tryed v3.. and v4..)
    "jquery": "^3.6.0",
    "jquery-ui": "^1.13.1",
    "jquery-ui-dist": "^1.13.0",
    "portal-vue": "^2.1.7",
    "vue": "^2.6.14",
    "vue-router": "^3.5.3",
    "lodash": "^3.10.1"
  }

As written in this documentation ( http://vuejscomponent.com/gridstack ), I think i have to add the alias:

alias: {
    'jquery': 'gridstack/dist/jq/jquery.js',
    'jquery-ui': 'gridstack/dist/jq/jquery-ui.js',
    'jquery.ui': 'gridstack/dist/jq/jquery-ui.js',
    'jquery.ui.touch-punch': 'gridstack/dist/jq/jquery.ui.touch-punch.js',
  },

to the webpack config file, but I can't find the correct config file.

Do anyone have an idea? Or is there maybe another problem?

I can provide more code if that would be helpful.

Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source