After setting Magento 2 to production mode, Magento generated all the static files in pub/static/frontend/Vendor/theme/en_US except for the requirejs-config.min.js file, the file exists but its empty and some js files are returning 404 in browser, copying the generated file from when the server was on default mode (generated on the fly) and pasting it in requirejs-config.min.js once the server is on production mode, fixes the 404 files issue but the solution is a hack. any idea why Magento is not generating the file in any directory (fr_FR,en_US).

1 Answer 1


As your store is in production mode so you have to run deploy command for each language using this command : php bin/magento setup:upgrade && php bin/magento setup:static-content:deploy en_US fr_FR

if this will not work then,

Please try to generate log by push your store in developer mode so you will get all error logs.

If this helps then hit like.

Thank you Hiren Patel

  • thank you, I didn't think of using the "setup:static-content:deploy en_US fr_FR" command because setting Magento 2 on production mode (deploy:mode:set production) does the same thing(generates the files) but somehow the requirejs.config is only generated using (setup:static-content:deploy)
    – LeoG
    Commented Oct 4, 2020 at 20:07

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.