Drupal 8 update via drush removes files from vendor folder I recently made a core update with drush for D8.
After the update I saw that it removed a folder from the 'vendor' folder on the server? Why did that happen?

The module has been installed via Composer because it needs dependencies to be installed: https://www.drupal.org/project/alinks

Re-installing the dependencies, works:

composer require "wamania/php-stemmer"


Is there something I did wrong? Do I need to update the core in a different way rather then using drush if you have installed modules via composer?

Removing the module via backoffice D8 and then removing folders from 'module/contrib' and 'vendor' and then re-installing the module works, but that is just not the way to do.

Thanks.
This is normal, because an update with Drush overwrites vendor and composer.json. So if you've installed a module via composer you need to reinstall it the same way (but you should be able to avoid a reinstall in the backoffice if you manage to get the code base right before running update.php or drush updatedb).

Updating core with Drush is depracetated and this function is removed from Drush 9.0. So you might consider switching core to a composer based install.

Edit to answer this comment:


  Well I'm a bit lost here on how to manage this, so more info is
  required I guess? Today I tried to install a module with composer
  (fieldblock) but could not find it? So I had to install it with drush
  ... For me it is not really clear right now what the best practice is
  and how to avoid problems in the future when having a core update ..


It's still OK to manage core and module updates with Drush as long as you use only modules which can be installed by Drush and don't mix it with Composer. However, when you start to use composer only modules you should really think about switching over to a composer based Drupal install. It's possible to start a new composer based project and keep the existing database, see this great answer from @greg_1_anderson Updating core with Composer doesn&#39;t work