Package with the name "neos/flow" was found more than once

I’m trying to install the latest version of Neos on a new Debian 10 server.

Reduced steps to reproduce my problem:

  1. sudo composer create-project --keep-vcs neos/flow-base-distribution Acme.Demo
  2. cd Acme.Demo
  3. sudo ./flow kickstart:package Test.Site

Error I get:
The package with the name “neos/flow” was found more than once, please make sure it exists only once. Paths “Libraries/neos/flow/” and “Framework/Neos.Flow/”.

The installation was not successful.
Composer returned the error code: 1493030262

Type: Neos\Flow\Package\Exception
Code: 1572187932
File: Packages/Framework/Neos.Flow/Classes/Package/PackageManager.php
Line: 385

The kickstart creates a flow folder in Packages/Libraries/neos with the same “neos/flow” name in composer.json

Can you help me what am I doing wrong?

Hello Daniel!

Are you trying to install Neos, or the Flow framework?

If you would like to install Neos you need the base distribution.

composer create-project neos/neos-base-distribution Acme.Demo

Hi Simon, thanks for the response. I’m trying to install Neos. Now I see the documentation I followed was for Flow. It’s a bit confusing, I got there from neos.io. Is there a comprehensive documentation for Neos that I can use?

I tried your suggestion and I got a lot further but still not quite there.

A. If I go to mydomain/setup then after entering the temporary password nothing happens, I get a blank site.

B. If I try to follow the steps in the console, I can set up the database, create tables and create admin but

B1. If I try to create a new package
sudo ./flow kickstart:site Test.Site
I get the same error as before: The package with the name “neos/flow” was found more than once, please make sure it exists only once. Paths “Libraries/neos/flow/” and “Framework/Neos.Flow/”

B2. If I try to use the demo site
sudo composer require neos/demo
sudo ./flow flow:package:rescan
sudo ./flow site:import Neos.Demo
I get this error: During the import of the “Sites.xml” from the package “Neos.Demo” an exception occurred: Error: During import an exception occurred: “Could not convert target type “Neos\Media\Domain\Model\Image”: Tried to refresh the dimensions and meta data of Image asset “” but the file of resource “058705e7ec52e4b831a7720a5a083f6b42b13289” does not exist or is not a valid image.”., see log for further information.

ps - I also set file permissions with this: sudo chown -R www-data:www-data /var/www/html/Acme.Demo/

Also I think I should mention that I have a site in production on an ancient version of Neos that I haven’t touched for many many years and I would like to rewrite that with the latest version. So I have managed to do all this once like a decade ago but I’m struggling with this latest version for some reason.

Sounds as if the neos/composer-plugin is not running as expected, which is responsible for placing the packages in the correct folder.

Check your composer version, and if you are on a very old Flow/Neos, you might need to run composer update a few times in succession and delete Packages/Libraries/neos/flow in between.

Another possibility is that you did not allow Composer to run the plugin, see Config - Composer.

Thanks @kdambekalns for your response.

I have composer v2.5.5 which is the latest as far as I know.
I’m trying to install Neos on a new EC2 instance that I only use for this purpose. The very old Neos I mentioned above is running on a different instance.
This is what I have in /var/www/html/Acme.Demo/composer.json
“config”: {
“vendor-dir”: “Packages/Libraries”,
“bin-dir”: “bin”,
“allow-plugins”: {
“neos/composer-plugin”: true
}
},

I’m sure it’s something silly since thousands of users must be installing Neos without problems… In the meantime I’ll launch another EC2 instance but with Amazon linux instead of Debian and see if that helps.

I launched a new EC2 instance with Amazon Linux 2 and did everything from scratch. Here are the exact steps I did. I have no idea what could be wrong. Please let me know if you see anything and is there a documentation available I could follow? This is getting frustrating. Thanks in advance for your help.

Install Apache

  1. sudo yum -y install httpd
  2. sudo service httpd start
  3. sudo chkconfig httpd on
  4. systemctl status httpd

Install PHP 8.2

  1. sudo amazon-linux-extras enable php8.2
  2. sudo yum clean metadata
  3. sudo yum install php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap}
  4. sudo service httpd restart
  5. copy info.php to /var/www/html to test <?php phpinfo(); ?>

Install Composer

  1. curl -s https://getcomposer.org/installer | php
  2. sudo mv composer.phar /usr/local/bin/composer
  3. composer -V
  4. composer self-update

Create Database

  1. MySQL is already installed on a different EC2 instance
  2. Create schema, database user, grant privileges

Install Neos

  1. cd /var/www/html
  2. sudo /usr/local/bin/composer create-project neos/neos-base-distribution Acme.Demo
  3. cd Acme.Demo
  4. sudo chown -R apache:apache /var/www/html/Acme.Demo/
  5. sudo ./flow setup:database
    pdo_mysql
    {database server URL}
    {neos schema}
    {database user}
    {database password}
  6. sudo ./flow doctrine:migrate
  7. sudo ./flow setup:imagehandler
  8. sudo ./flow user:create --roles Administrator {username} {password} {first name} {last name}
  9. sudo ./flow kickstart:site Test.Site

ERROR: The package with the name “neos/http-factories” was found more than once, please make sure it exists only once. Paths “Framework/Neos.Http.Factories/” and “Libraries/neos/http-factories/”.