This article describes how to fix the issue where you get the "Vendor autoload is not found. Please run 'composer install' under application root directory." error message, while updating the composer using the
composer update command.
Affected products and versions
- Magento Open Source 2.X.X
Step to reproduce
- Update composer using the
Everything works correctly, the composer is updated with the necessary dependency files.
Failure with the error message saying:
Composer\Downloader\TransportException] The "https://[insert bad composer repository address here]/packages.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known failed to open stream: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
The cause of the problem is you are not using the only correct composer repository link of https://repo.magento.com/. You must use https://repo.magento.com/ because it is the only correct composer repository server address. Using any other composer repository server address will lead to this error.
There are two main reasons why this could happen:
- You are using an old Magento repository address.
- You are using an old repository address hosted on some non-Magento server elsewhere on the Internet, because you are using offsite, and possibly outdated, instructions that are not the Magento installation instructions in DevDocs: Install Magento using Composer.
The common solution for both reasons would be to use the only correct and current composer repository, https://repo.magento.com/.