Magento 2 local development installation is working fine, however the production installation has some issues regarding the checkout. Certain files are not loaded, resulting in an endless spinning wheel load screen.

Looking up the missing files, I found out a lot of js files are not being deployed to the static folder on the live server. They are being deployed on the local environment however. Thoughts or tips would be welcome! magento 2 js error

  • compile first and change to production Jul 5, 2017 at 7:45

4 Answers 4


If your production environment uses SSL make sure to have the environment variable HTTPS set to on.

You can set it as part of the static-content:deploy command HTTPS='on' php bin/magento setup:static-content:deploy

  • 2
    Thanks!! This solved my problem, all js files are now deployed correctly and checkout is behaving like normal again.
    – perrivdb
    Jul 5, 2017 at 13:40

Hard to say based off this info alone, although this should resolve:

  1. Ensure your environment is in production mode - php bin/magento deploy:mode:set production
  2. Run php bin/magento setup:static-content:deploy

If the files are not found in the static files, you need the proper deployment and proper file permissions.

Open the terminal and navigate to magento web root

 $ cd /var/www/html/magento2 
Step 1.

 $ php bin/magento setup:static-content:deploy
Step 2.

$ php bin/magento indexer:reindex
Step 3.

make sure apache “rewrite_module” is enable and then restart the server

Step 4.

$ chown -R apache:apache /var/www/html/magento2 //change the group and user name as per your server
Step 5.

 $ chmod -R 777 /var/www/html/magento2 
Step 6.

delete cache folder under var/cache

And for the file permissions, please look on the following link:


  • Thanks for your suggestion, although all file permissions were set correctly. the answer @codekipple gave me solved my problem!
    – perrivdb
    Jul 5, 2017 at 13:39

I totally understand you. Checkout is a real headache for developers. Most of the problems arise precisely at this stage. Mostly it is caused by JS that sometimes overloads checkout page. Recently, I came across a guide that contains the main issues that we face, as well as a solution to these problems. You will find her here. Hope this helps you :)

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.