Magento 2 – Fix Autoload Error: Vendor Autoload Not Found, Run ‘composer install’

composergitinstallationmagento2

I cloned one gitlab project into the local system in windows. When I am running the project it shows the error like this.
Vendor autoload is not found. Please run 'composer install' under the application root directory.
Please tell what are the things to be done.
And also why the files like env.php are missing in app/etc folders when cloning it from gitlab?

Best Answer

Actually your vendor is empty, because it always added in .gitignore. To resolve this follow these steps

  1. Download and install composer for windows
  2. Run CMD and go to your project directory
  3. Run composer install. This will install all the required modules in vendor directory
  4. Now execute following commands and check after that

php -dmemory_limit=1G bin/magento setup:upgrade php -dmemory_limit=1G bin/magento setup:di:compile php bin/magento deploy:mode:set developer --skip-compilation php bin/magento setup:static-content:deploy -f php bin/magento cache:clean php bin/magento cache:flush

This should resolve your issue