Note: this is not a duplicate. The site has a set of modules installed manually and via Composer: can I move everything to Composer?
As this question below involves different file locations.
I currently have modules installed via the Drupal user interface (/ admin / modules / install) that have been installed in the / modules directory.
And I also have modules installed by composer that are added to the / modules / contrib directory
Task: To move the modules to Managed Composer.
I ran "composer require drupal / MODULE" which placed the module at the location / modules / contrib. But now there are 2 copies and after updating and removing the cache, Drupal still uses the old module location. (I can say that the installed module of the composer is a newer version)
I would rather not have to uninstall all the modules that need to be moved, as this can be a problem.
I've just tried removing the module from the / modules directory (leaving the new composer module installed in modules / contrib), but I get the WSOD.
Question: How to switch modules to Managed Composer with a different directory location?