cancel
Showing results for 
Search instead for 
Did you mean: 

main.CRITICAL:Unable to resolve the source file for 'frontend/Magento/luma/en_US/swiper.min.js

main.CRITICAL:Unable to resolve the source file for 'frontend/Magento/luma/en_US/swiper.min.js

im getting this error in my debug.log file when i open my home page. The page opens normally but im trying my widget that uses swiper.js to appear in the proper way with swiper features.

My requirejs-config file doesnt mention anything of the swiper and it looks like this

var config = {
    map: {
        '*': {
            categoryCheckboxTree:'Skrey_ProductSlider/js/category-checkbox-tree',
            'Magento_Catalog/js/category-checkbox-tree':'Skrey_ProductSlider/js/category-checkbox-tree',
        }
    }
};

im using a module from other person and im trying to use it on my computer but the widget doesnt come correclty is this the problem?

This is where swiper is being used (in a phtml file):

<script>
        require(['swiper', 'jquery'], function(Swiper, $){
			var swiper_selector = '.items-swiper-skrey-slide<?=$_uniqid;?>';
			var swiper = new Swiper($(swiper_selector),{
				slidesPerView: <?= $block->isCountdownActive()?4:5?>,
				spaceBetween: 20,
				breakpoints: {
					320: {
					slidesPerView: 2,
					spaceBetween: 0
					},
					640: {
					slidesPerView: 3,
					spaceBetween: 0
					},
					767: {
					slidesPerView: 4,
					spaceBetween: 0
					},
					1000: {
					slidesPerView: <?= $block->isCountdownActive()?4:5?>,
					spaceBetween: 0
					}
				},
				preloadImages: true,
				updateOnImagesReady: true,
				mousewheel: false,
				simulateTouch: true,
				freeMode: true,
				navigation: {
					nextEl: '.swiper-button-next.swiper-button-next-slide-<?= $_uniqid ?>',
					prevEl: '.swiper-button-prev.swiper-button-prev-slide-<?= $_uniqid ?>',
				},
			});
		}    
        );
    </script>