xeno_hero
xeno_hero copied to clipboard
Installing with Composer
Just thought I would leave a note here in case anyone was wanting to install with Composer. Not sure if this is the official way to do it, but it worked for me.
- Update your project composer.json file with the xeno_hero repository:
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "git",
"url": "https://github.com/xenomedia/xeno_hero.git"
}
],
- Update your project composer.json file so it knows where to install the modules with the type of "drupal-custom-module". This is what is configured in the xeno_hero composer.json file. I put it in contrib with other modules but you could also put it in a custom directory.
"installer-paths": {
"web/modules/contrib/{$name}": ["type:drupal-module","type:drupal-custom-module"],
},
- Update Composer so it knows about the new repository.
composer update
- Add the module using Composer
composer require xenomedia/xeno_hero
After installing the module this way, how does one uninstall it in Drupal 8.
Composer remove doesn't give an error, but after that drush cr gives me this:
Fatal error: Uncaught AssertionError: The file specified by the given app root, relative path and file name (/app/docroot/modules/custom/xeno_hero/xeno_hero.info.yml) do not exist. in /app/docroot/core/lib/Drupal/Core/Extension/Extension.php:67
Stack trace:
#0 /app/docroot/core/lib/Drupal/Core/Extension/Extension.php(67): assert(false, 'The file specif...')
#1 /app/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(114): Drupal\Core\Extension\Extension->__construct('/app/docroot', 'module', 'modules/custom/...', 'xeno_hero.modul...')
#2 /app/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\Core\Extension\ModuleHandler->__construct('/app/docroot', Array, Object(Drupal\Core\Cache\ChainedFastBackend))
#3 /app/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php(173): Drupal\Component\DependencyInjection\Container->createService(Array, 'module_handler')
#4 /app/docroot/core/lib/Drupal/Core/DrupalKernel.php(586): Drupal\Component\DependencyInjection\Container->get('module_ha in /app/docroot/core/lib/Drupal/Core/Extension/Extension.php on line 67
[warning] Drush command terminated abnormally.
Any thoughts? Thanks!
@jsibley2 It looks like the module wan't uninstalled prior to the removal. You may want to add it back in, uninstall it, and then remove it.
Sorry, that was it. Thanks!
I'm trying to use the commands above to install xeno hero using composer, however when I do there's nothing to install or update. Nothing comes from the repository despite the composer.json file updating.
I'm getting this error after doing the following procedure: uninstalled Simple OAuth module -> cleared the cache via admin pannel -> run the command composer remove drupal/simple_oauth.
Would appreciate any help. Thanks.
The website encountered an unexpected error. Please try again later.
AssertionError: The file specified by the given app root, relative path and file name (/usr/www/users/lsmrk/modules/contrib/consumers/consumers.info.yml) do not exist. in assert() (line 73 of core/lib/Drupal/Core/Extension/Extension.php).
assert() (Line: 73)
Drupal\Core\Extension\Extension->__construct() (Line: 114)
Drupal\Core\Extension\ModuleHandler->__construct() (Line: 259)
Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
Drupal\Component\DependencyInjection\Container->get() (Line: 588)
Drupal\Core\DrupalKernel->preHandle() (Line: 46)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
I'm getting this error after doing the following procedure: uninstalled Simple OAuth module -> cleared the cache via admin pannel -> run the command composer remove drupal/simple_oauth.
Would appreciate any help. Thanks.
The website encountered an unexpected error. Please try again later. AssertionError: The file specified by the given app root, relative path and file name (/usr/www/users/lsmrk/modules/contrib/consumers/consumers.info.yml) do not exist. in assert() (line 73 of core/lib/Drupal/Core/Extension/Extension.php). assert() (Line: 73) Drupal\Core\Extension\Extension->__construct() (Line: 114) Drupal\Core\Extension\ModuleHandler->__construct() (Line: 259) Drupal\Component\DependencyInjection\Container->createService() (Line: 177) Drupal\Component\DependencyInjection\Container->get() (Line: 588) Drupal\Core\DrupalKernel->preHandle() (Line: 46) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704) Drupal\Core\DrupalKernel->handle() (Line: 19)
Solved it.