I'm trying to install an extension; the Tobai Geo Store Switcher through Composer. I'm getting an error saying it can't find this file; /var/www/html/magento/bin/app/etc/vendor_path.php. I've checked and sure enough, it doesn't exist. I have no idea if the problem is with Magento, Composer, or the extension. Command and output is below;
[EDIT] It turns out it's killed Magento too. Can't get into the Admin Panel or the front end store.
root@dev-magento:/var/www/html/magento/bin# composer require tobai/magento2-geo-store-switcher
Using version ^1.1 for tobai/magento2-geo-store-switcher
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing magento/magento-composer-installer (0.1.6)
Loading from cache
- Installing maxmind/web-service-common (v0.0.4)
- Installing maxmind-db/reader (v1.1.0)
- Installing geoip2/geoip2 (v2.3.3)
- Installing tobai/magento2-geo-ip2 (1.0.0)
- Installing tobai/magento2-geo-store-switcher (1.1.1)
Writing lock file
Generating autoload files
file_put_contents(/var/www/html/magento/bin/app/etc/vendor_path.php): failed to open stream: No such file or directory
require [--dev] [--prefer-source] [--prefer-dist] [--no-plugins] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
app/etc/vendor_path.php is a system Magento 2 file: https://github.com/magento/magento2/blob/2.0.2/app/etc/vendor_path.php
Ok, so it's a Magento file, but why doesn't it exist in my installation of Magento? I certainly haven't removed it.
Try to install from Magento 2 root. So switch from bin directory to M2 root and the system will give you the right path.