Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top