[SOLVED] The package with the name "neos/demo" was found more than once

When I try to install something with composer (e.g. flowpack/nodetemplates or neos/neos-ui) I get the following error:

The package with the name "neos/demo" was found more than once, please make sure it exists only once. Paths "Inactive/Sites/Neos.Demo/" and "Inactive/Sites/Neos.Demo/".

If I remove demo site from composer.json and composer.lock it succeeds so there is a workaround but still annoying and I wonder if it’s me doing something wrong.

If anybody has ran into it and there’s a solution other than remove demo site from files please let me know.

Thank you,

This can happen if you copy or move a package.

In case you moved a package, it can be a false positive, so make sure to rescan for packages.

./flow flow:package:rescan

Otherwise, it’s simply as the error states. Two packages contain a “composer.json” file with “name”: “neos/demo”. Search for it to find it and fix it.

Btw. in case you copied the neos/demo package as a basis for a new package, make sure to remove the original neos/demo package using this command to avoid conflicts.

composer remove neos/demo