1

Hello!

I have Magento version 2.3.3.

I run:

bin/magento setup:upgrade

bin/magento setup:di:compile

bin/magento bin/magento setup:static-content:deploy -f

And permissions for folders:

enter image description here

But after commands in pub/static/frontend folder i not find module with my styles and with my JS code.

How i can fix it?

Please, help me)

  • Is your website has multiple stores? – MagentoUser Dec 16 '19 at 12:01
  • @MagentoUser, no - my website - single store – David Young Dec 16 '19 at 12:15
1

1. Put your Custom JS file in the following directory

app/code/Vendor/YourModuleName/view/frontend/web/js/your_js_file_name.js

-> And your require-config.js file is in directory

var config = {
        map: {
            '*': {
                myjs: 'Vendor_YourModuleName/js/your_js_file_name'
            }
        }
    };

2. Delete Generated Files, Sessions & Caches:

YOUR_MAGENTO2_ROOT/var/cache/ ****DELETE ALL****

YOUR_MAGENTO2_ROOT/var/page_cache/ ****DELETE ALL****

YOUR_MAGENTO2_ROOT/var/session/ ****DELETE ALL****

YOUR_MAGENTO2_ROOT/var/view_preprocessed/ ****DELETE ALL****

-> Also, remove everything including old generated static files from below path except .htaccess:

YOUR_MAGENTO2_ROOT/pub/static/ ****DELETE ALL**** EXCEPT .HTACCESS

YOUR_MAGENTO2_ROOT/generated/code/ ****DELETE ALL****

YOUR_MAGENTO2_ROOT/generated/metadata/ ****DELETE ALL****

3. Open terminal and run following commands:

php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
chmod -R 777 var/ pub/ generated/
chmod -R 777 var/* pub/* generated/*

Now check your modules js files are loaded under pub/static/

0

I resolved problem!

My folder that I searched in the folder pub/static located in app/design and Magento 2.3.3 will not use this code unless it is a module.

Therefore, I need to transfer my code to app/code/[Alias].

Hope this information helps someone.

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.