evanshunt / eh-ss-blocks

SilverStripe module to install basic custom elemental blocks
0 stars 0 forks source link

Fresh install creates duplicate dependencies #17

Open dmcb opened 6 years ago

dmcb commented 6 years ago

On SS 4.2, installing this module breaks the site with the following message:

Fatal error: Uncaught Exception: There are two files containing the "Composer\Autoload\ClassLoader" class: "/var/www/html/vendor/composer/ClassLoader.php" and "/var/www/html/vendor/evanshunt/elemental-addons/vendor/composer/ClassLoader.php" in /var/www/html/vendor/silverstripe/framework/src/Core/Manifest/ClassManifest.php:510 Stack trace: #0 /var/www/html/vendor/silverstripe/framework/src/Core/Manifest/ClassManifest.php(448): SilverStripe\Core\Manifest\ClassManifest->handleFile('ClassLoader.php', '/var/www/html/v...', false) #1 [internal function]: SilverStripe\Core\Manifest\ClassManifest->SilverStripe\Core\Manifest\{closure}('ClassLoader.php', '/var/www/html/v...', 5) #2 /var/www/html/vendor/silverstripe/assets/src/FileFinder.php(176): call_user_func(Object(Closure), 'ClassLoader.php', '/var/www/html/v...', 5) #3 /var/www/html/vendor/silverstripe/framework/src/Core/Manifest/ClassManifest.php(451): SilverStripe\Assets\FileFinder->find('/var/www/html') #4 /var/www/html/vendor/silverstripe/framework/src/Core/Manifest/ClassM in /var/www/html/vendor/silverstripe/framework/src/Core/Manifest/ClassManifest.php on line 510

The module installs with its own vendor directory within it containing duplicate dependencies.

sinan-evanshunt commented 6 years ago

Manually deleting the duplicate under /var/www/html/vendor/evanshunt/elemental-addons/vendor/* still complains about other duplicates.

davejtoews commented 6 years ago

The vendor directory should not be in the repo. Delete vendor and add it to .gitignore.