Hi I am having trouble migrating my local site to development (two seperate servers). I believe the reason being is because I can not install an unstable Calendar Module, which I have on my local but not on my development. In my development site I git pull successfully and checked the repo https://www.drupal.org/project/calendar/releases/8.x-1.x-dev was running. I did composer require 'drupal/calendar:1.x-dev'. I also have "minimum-stability": "dev" in my composer.json.

When I run drush cr I get:

[error] The "calendar" plugin does not exist.

So it seems that I do not have calendar module downloaded. I check my composer.json file and have

"require": {
    "drupal/calendar": "1.x-dev"
},

but when I run

composer update

I get

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess

and nothing gets downloaded. Am I missing anything?

Any help or pointers would be helpful! Thanks in advance.

  • It works for me. What's your installer-paths in your composer file? No directory has been add somewhere? – Claire D May 7 at 17:31
  • Actually that composer command did not work, it just reverted my changes. But here are my installer paths "installer-paths": { "core": ["type:drupal-core"], "modules/contrib/{$name}": ["type:drupal-module"], "profiles/contrib/{$name}": ["type:drupal-profile"], "themes/contrib/{$name}": ["type:drupal-theme"], "drush/contrib/{$name}": ["type:drupal-drush"], "modules/custom/{$name}": ["type:drupal-custom-module"], "themes/custom/{$name}": ["type:drupal-custom-theme"] } and yes the... – ARMANDO SILVA May 7 at 17:49
  • directory is [root]/vendor/drupal/calendar. I check my /admin/modules and do not see a calendar module however. – ARMANDO SILVA May 7 at 17:50
  • What happens when you drush pm:enable calendar? Maybe it's still too "dev" to be enablable at all... – leymannx May 7 at 18:11
  • [error] Unable to install modules calendar due to missing modules calendar. Yeah its very unstable module, but drush can't enable it. Would it be best if I manually insert it in modules? That would defeat the purpose of composer and future updates, but could there be other forseeable issues with that? – ARMANDO SILVA May 7 at 18:27

For the meantime, I just installed calendar module manually since it may be too "dev".

wget https://ftp.drupal.org/files/projects/calendar-8.x-1.x-dev.tar.gz
tar -xzf calendar-8.x-1.x-dev.tar.gz

hoping they will make a stable calendar in the meantime.

Is the module installing and working locally? I've had a similar issue with dev modules before. The problem is that they will ship with a .git directory and sometimes when I try to commit the module to my project's git repo it won't be committed because of the .git in the submodule. I bet if you navigate to the calendar directory on your server it will be empty.

A solution to this is to remove the .git directory from the submodule, e.g. /modules/contrib/calendar/.git before committing to your project's repo. If you've already committed, git will probably still try to ignore the directory after you remove the .git from the submodule, but you can remedy this by using git rm -r --cached modules/contrib/calendar (or whatever appropriate path). Then you can git add and git commit the submodule.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.