Can Mautic run (not install) on a server without NPM?

Your software
My Mautic version is: 5
My PHP version is: 8.1
My Database type and version is: MySQL 8

Your problem
My problem is:
I would not like to setup NPM on my webserver if it can be avoided.

Now, for the installation Mautic required NPM.
For running it as well?
Is it a feasable workaround to install it on a local virtual environment and then rsync everything to the webhosting environment?

When will the next issues arise, without NPM installed?
The next upgrade?

We do not run npm on our production server, I build the necessary file locally with npm and then push to production. This will allow me to run grapesjs for the page and email builder without issue. It’s not documented in Mautic on how to do this (it is on my list to provide that documentation tho when I have time).

disclaimer
Our setup might be very different from yours. I am part of a team of two developers who looks after Mautic for the company I work for so we have the knowledge on doing this.

I see.
Thanks for the reply.

How do you do updates then, in case there are DB updates required?
Copy a dump from live to staging, build on staging, deploy code & DB back to live and all that with a little down time?

We handle mautic upgrades differently as we have some core code modified to suit the company needs. But basically we update locally, put our own changes back in push the code to the staging server, run doctrine schema update and then test extensively.

Worked really well when we went from v3 to v4. Then its rinse and repeat for production and we only went into maintenance mode for about 30mins or so.

1 Like

I upgraded to Mautic v5.0.3 on shared hosting and get errors that apparently only “NPM” can fix. I cannot install NPM nor NodeJS.

Is there no easier way to get the necessary files than to install an entire local MAMP setup, NPM, and Mautic just to create a few files–then copy/paste them to my live instance? Seems wonky. Am I missing something?

1 Like

Turns out, my webhost WILL let me install NPM…but still, why should anyone have to?