My first serious try to install Mautic 5 - YELLOW and RED errors in composer create project 5 github command

Hello to all,

Thanks for this great community.

I’m in my first serious try to install Mautic 5

I’m familiar with the old Mautic 3 and 4 installs, I manage nearly 20 installs today in 4.x, hosting, domain, DNS, SSL certificates, Mautic, campaigns, etc.

Your software
My Mautic version is: 5.0.4
My PHP version is: 8.3.7
My Database type and version is: MariaDB Ver 15.1 Distrib 10.11.6-MariaDB

My steps:
Debian 12 host on Clouding.io
Webmin already working
Virtualmin already working
Created virtualhost for mautic 5 instance
Configured SSL with Let’s Encrypt, all OK
Apache works, PHP works, PHPINFO show and works. OK

Installed composer from getcomposer.org latest 4 commands OK.
Moved composer to /usr/local/bin for PATH OK
composer command works both executing from ROOT and from mautic user (virtualmin)

composer -V shows version 2.7.6

logged in
created dir mautic in /public_html/
changed working directory to: /public_html/mautic

1st command try:
composer create-project mautic/recommended-project:^5.0 mautic --no-interaction

SHOWED errors on missing PHP modules: IMAP and BCMATH…
installed both under ROOT with:
apt install php8.3-imap OK
apt install php8.3-bcmath OK

Your problem
My problem is:
2nd command try:
composer create-project mautic/recommended-project:^5.0 mautic --no-interaction

These errors are showing in the log:

ERRORs on INSTALLATION LOG:

YELLOW ERROR

Package sensio/framework-extra-bundle is abandoned, you should avoid using it. U se Symfony instead.
Package theofidry/psysh-bundle is abandoned, you should avoid using it. No repla cement was suggested.
Package tightenco/collect is abandoned, you should avoid using it. Use illuminat e/collections instead.
Generating autoload files
115 packages you are using are looking for funding.
Use the composer fund command to find out more!

YELLOW ERROR

Deprecation Notice: Return type of Mautic\Composer\Plugin\Scaffold\Operations\Sc affoldFileCollection::getIterator() should either be compatible with IteratorAgg regate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute sh ould be used to temporarily suppress the notice in /home/mautic/public_html/maut ic/vendor/mautic/core-composer-scaffold/Operations/ScaffoldFileCollection.php:11 8

RED ERRORS

npm ci --prefer-offline --no-audit
sh: 1: npm: not found
Script npm ci --prefer-offline --no-audit handling the npm-ci event returned wit h error code 127
Script @npm-ci was called via post-update-cmd

Steps I have tried to fix the problem:
No idea!
I tried browsing to :
https:// domain name /mautic/docroot/index.php
and says “Forbidden”

THANKS

1 Like

You do not have npm installed on your system, thats why installation failed

Hello all,

This is what I did to install npm… having in mind that I’m under a VPS environment, on Debian 12 and Virtualmin as the VPS management tool…

Opened a terminal session with the root # user (I think you can also do sudo)…

Went to official node, nvm and npm official web page

selected on the menu the v20 on Linux using nvm…

these were the steps:

installs nvm (Node Version Manager)

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash

download and install Node.js (you may need to restart the terminal)

nvm install 20

verifies the right Node.js version is in the environment

node -v # should print v20.17.0

verifies the right npm version is in the environment

npm -v # should print 10.8.2

IMPORTANT:
These 2 last commands
node -v
and
npm -v
do not work on regular users (mautic user used for the mautic install).

So then… because node, nvm and npm installs only to the root user and a protected only root location (/root/.nvm at least in Debian12) , I need to MOVE the installation to somewhere where any other VPS linux user (like the mautic linux user) can call and run the commands.

So still using root I created a directory where node, npm and npx will reside:
mkdir /usr/local/nvm

then moved the node, nvm and npm installation there:
mv /root/.nvm /usr/local/nvm

then make sure the ownership of root and any user can reach and run:
chown -R root:root /usr/local/nvm
chmod -R a+rx /usr/local/nvm

then I created 3 symbolic links to call the node stuff. This will help to have the commands under the user PATH (check with the “env” command with the mautic installation linux user):
ln -s /usr/local/nvm/versions/node/v20.17.0/bin/node /usr/local/bin/node
ln -s /usr/local/nvm/versions/node/v20.17.0/bin/npm /usr/local/bin/npm
ln -s /usr/local/nvm/versions/node/v20.17.0/bin/npx /usr/local/bin/npx

Commands should work now for all users, enabling launching the mautic install:
node -v
npm -v
npx -v

Commands to test from the normal mautic users:
ls -l /usr/local/bin/node
ls -l /usr/local/bin/npm
ls -l /usr/local/bin/npx

Hope this helps.

Thanks and hi to all the community!

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.