0

I'm using "push to deploy" method to deploy Magento 2 app with GIT.

After pushing to master following commands are executed on the production server:

git checkout master && git pull origin master
composer install
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento setup:di:compile
php bin/magento cache:clean

After this, some static files have status code 404. Looks like they are not generated.

For example:

ls -l pub/static/frontend/Smartwave/xxxxx/sl_SI/mage/requirejs/
lrwxrwxrwx 1 magento magento 70 Jun 23 17:21 mixins.js -> /home/magento/www.xxxxx.si/public/lib/web/mage/requirejs/mixins.js
lrwxrwxrwx 1 magento magento 72 Jun 23 17:21 resolver.js -> /home/magento/www.xxxxx.si/public/lib/web/mage/requirejs/resolver.js
lrwxrwxrwx 1 magento magento 68 Jun 23 17:21 text.js -> /home/magento/www.xxxxx.si/public/lib/web/mage/requirejs/text.js

I have deleted all folders, tried all commands for di:compile and deploy all over again, cleared cache, etc. Looks like nothing else works other than changing deploy mode to developer and then back to production.

php bin/magento deploy:mode:set developer
php bin/magento deploy:mode:set production

After this files like pub/static/frontend/Smartwave/xxxxx/sl_SI/mage/requirejs/mixins.js are back in the folder.

There must be something that I'm missing... Any help would be much appreciated.

0

You should run deploy command with your locale.

Run below command..

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

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.