I'm trying to load the slick carousel into my magento theme and it generates a huge error: "Uncaught Error: Mismatched anonymous define() module". I think it must be related to require js, so I tried to add the following line of code to my require js, but it didn't solve the problem. How can I solve it?
The code I added:
var config = {
paths: {
'slick': "Magento_Theme/js/slick/slick.min"
},
shim: {
'slick': {
deps: ['jquery']
}
}
};
my default_head_blocks (head)
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="js/jquery-1.12.2.min.js" />
<script src="js/jquery-ui.js" />
<script src="requirejs/require.js" />
<script src="mage/polyfill.js" />
<script src="js/slick.min.js"/>
<css src="mage/calendar.css" />
<css src="css/bootstrap.css" />
<css src="css/slick.css" />
<css src="css/style.css" rel="stylesheet" type="text/css" />
<script src="js/owl.carousel.js"/>
<css rel="stylesheet" type="text/css" src="https://use.fontawesome.com/releases/v5.15.1/css/all.css" src_type="url" />
</head>