cancel
Showing results for 
Search instead for 
Did you mean: 

Problem installing extension through Composer

Problem installing extension through Composer

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)
    Downloading: 100%

  - Installing maxmind-db/reader (v1.1.0)
    Downloading: 100%

  - Installing geoip2/geoip2 (v2.3.3)
    Downloading: 100%

  - Installing tobai/magento2-geo-ip2 (1.0.0)
    Downloading: 100%

  - Installing tobai/magento2-geo-store-switcher (1.1.1)
    Downloading: 100%

Writing lock file
Generating autoload files


  [ErrorException]
  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>]...

3 REPLIES 3

Re: Problem installing extension through Composer

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

 

Re: Problem installing extension through Composer

Ok, so it's a Magento file, but why doesn't it exist in my installation of Magento? I certainly haven't removed it.

Re: Problem installing extension through Composer

Hello:

 

Try to install from Magento 2 root. So switch from bin directory to M2 root and the system will give you the right path.