1

I am working on magento version 2.1.3 and have a custom theme shoppersbay. For some js files it gives error like

Unable to resolve the source file for 'frontend/Smartwave/shoppersbay/en_US/Magento_ConfigurableProduct/js/variations/paging/sizes.js' 0 /home4/shoppoz8/public_html/shoppersbay/vendor/magento/framework/App/StaticResource.php(97): Magento\Framework\View\Asset\File->getSourceFile() 1 /home4/shoppoz8/public_html/shoppersbay/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\StaticResource->launch() 2 /home4/shoppoz8/public_html/shoppersbay/pub/static.php(13): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\StaticResource)) 3 {main}

I searched for the file sizes.js but i didn't find any in theme and in vendor directory. How can i resolve it?

0

Because that file sizes.js is not belong to frontend scope. It belongs to adminhtml.

magento/module-configurable-product/view/adminhtml/web/js/variations/paging/sizes.js

/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
define([
    'Magento_Ui/js/grid/paging/sizes'
], function (Sizes) {
    'use strict';

    return Sizes.extend({
        defaults: {
            excludedOptions: ['100', '200']
        },

        /**
         * @override
         */
        initialize: function () {
            this._super();

            this.excludedOptions.forEach(function (excludedOption) {
                delete this.options[excludedOption];
            }, this);
            this.updateArray();

            return this;
        }
    });
});

Solution for your problem is delete any references to sizes.js in your custom theme. And asks the vendor to fix it, obviously :)

  • Yes adminhtml contains this js. But i can't find the reference to this file in the theme. Any help to find it. where i can search for it. – Nitin Pawar Jun 13 '17 at 8:07
  • @NitinPawar Please use PhpStorm or whatever you like and search for 'Magento_ConfigurableProduct/js/variations/paging/sizes.js' inside 'frontend/Smartwave/shopperbays' – Toan Nguyen Jun 13 '17 at 8:09
  • I searched everywhere in theme and other modules but i can't found the reference for file. Also tried to remove file using <remove src="file_name"> but it is not working. – Nitin Pawar Jun 13 '17 at 11:42
  • @NitinPawar I'm so sorry, inside frontend/Smartwave/shopperbays may not contain this, it must be specified inside app/code/Smartwave – Toan Nguyen Jun 14 '17 at 6:41

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.