3

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?

Teja Bhagavan Kollepara
3,8275 gold badges33 silver badges69 bronze badges
asked Jun 13, 2017 at 8:02

1 Answer 1

1

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 :)

answered Jun 13, 2017 at 8:05
4
  • 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. Commented Jun 13, 2017 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' Commented Jun 13, 2017 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. Commented Jun 13, 2017 at 11:42
  • @NitinPawar I'm so sorry, inside frontend/Smartwave/shopperbays may not contain this, it must be specified inside app/code/Smartwave Commented Jun 14, 2017 at 6:41

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.