This is a warning from Composer advising against running Composer as the root or superuser.
In many cases, running Composer as the root or superuser can lead to certain issues, such as permission-related problems—for example, preventing the generated files from being read or written to.
If you are unable to run Composer with your regular user account, you can configure it accordingly. COMPOSER_ALLOW_SUPERUSER Using environment variables to run Composer as the root/superuser is possible; however, this option should be used with caution, and such scenarios should be avoided whenever possible.
For example, in a Linux or macOS terminal, you can run the following command to allow running Composer as the root user:
export COMPOSER_ALLOW_SUPERUSER=1Then run it. composer Just type the command.
Additionally, you can refer to the official Composer documentation. Related Notes Learn more details