My environment:

  • Magento 2.0.4
  • Production mode enabled
  • Cache enabled.

I wanted to speed up my Magento 2 store by minifying all Javascript codes. I enabled the JS Minifying option in admin panel and left the rest options (merging and budnling) set to 'no'.

After that all JS scripts stopped working: menus, cart, checkout etc.

There are many errors in console listed. However, they are mainly about missing min.js files. They were simply didn't generated somehow.

Please let me know how to fix it.

  • Have you deployed static contents? Use php bin/magento setup:static-content:deploy to deploy static contents. Commented Apr 11, 2017 at 9:57
  • 1
    Yes, I tried it but no sinlge min.js file was generated . Commented Apr 11, 2017 at 10:20
  • 2
    Same problem, ever figure it out? Commented Sep 18, 2017 at 19:09

4 Answers 4


In my case this error happens when i have not setup permission correctly.

Try running:

sudo find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \;  && sudo chmod u+x bin/magento
sudo chown -R $(whoami):www-data .

Change www-data to appropriate web server user. e.g. apache or www-data


The next step would be to see if you can find the file it's trying to load on the filesystem. If it's there, it would point to a web server configuration problem instead. Which web server are you on apache2 or nginx?


Just to mention solution that worked for me - if you use multiple languages then make sure you try deploying static content with explicitly specify languages

php bin/magento setup:static-content:deploy en_US sk_SK

Of course change language codes accordingly


please also enable "Enable JavaScript Bundling" option

store->configuration->advanced->developer->javascript setting->

Enable JavaScript Bundling set to "yes"

and flus cache

I hope it's help you

after Enable JavaScript Bundling run following command

rm -rf pub/static/*
php bin/magento cache:clean
php bin/magento cache:flush 
php bin/magento setup:static-content:deploy
  • It didn't help. Still no minified JS files generated Commented Apr 11, 2017 at 10:54

Your Answer

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

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