__DIR__.'/src'"Vendor\\Module\\": "src/"bin/magento module:uninstall Vendor_Module --remove-dataBut if you add a composer.json file to src/ then it will uninstall the module, but this is not where the composer.json file should be for 3rd modules.
Related issues:
https://github.com/magento/magento2/issues/7064
https://github.com/magento/magento2/issues/3290
You can look in Magento\Framework\Module\Dir->getComposerJsonFiles() for the problem
the conflict comes from a method inside
Magento\Framework\Module\Dir\Reader.php
where
private function getFiles($filename, $subDir = '')
where
$file = $moduleSubDir . '/' . $filename;
is looking composer.json from path defined in composer.json itself as psr-4 (and not using the composer.json that was used to install the module )
@PascalBrouwers, thank you for your report.
We've created internal ticket(s) MAGETWO-81455 to track progress on the issue.
Most helpful comment
You can look in Magento\Framework\Module\Dir->getComposerJsonFiles() for the problem