Why Mautic 7.2.2 Install with Composer Might Fail—and How to Fix It

If you’ve tried installing Mautic 7.2.2 using the recommended Composer method on PHP 8.4 and run into errors like “The site is currently offline due to encountering an error” or missing files in the node_modules directory, you’re not alone.

Here’s the deal: A recent community thread uncovered a frustrating install snag where key frontend assets—like JavaScript libraries (mousetrap.js, jquery.js) and CSS files—are missing after running Composer. The installer doesn’t seem to create the node_modules directory, and trying to build Sass assets with php bin/console sass:build either fails or times out.

Why does this happen? Mautic’s frontend tooling relies heavily on Node.js packages installed via npm or Yarn, which Composer alone doesn’t handle. The official zip download also doesn’t include node_modules because these are environment-specific build artifacts. So simply running Composer is not enough to get the frontend assets ready.

The workaround community members have found involves manually doing what Composer doesn’t: after installing Mautic via Composer, you need to run npm install (or Yarn) in your Mautic directory to pull in the necessary Node modules. Then run php bin/console sass:build again to generate CSS files from Sass. Without this, the site throws errors about missing files and fails to load.

If you got a 504 Gateway Timeout during the build step, it’s probably due to resource limits or long build times on your server. Increasing PHP and server timeout settings or running build steps locally and uploading the generated assets can help.

For most marketers and users, this highlights that Mautic’s install process isn’t entirely plug-and-play when it comes to the frontend build. It’s a small but critical part of the install that often trips up those relying solely on Composer. Until this gets streamlined, expect to get your hands dirty with a bit of Node.js setup if you want to run Mautic from source with the latest versions.

Our take? If you’re not comfortable with Node.js tooling or running command-line builds, consider managed platforms like Mailertizer that take care of these technical headaches. Otherwise, be prepared to dive into npm installs alongside Composer to get Mautic running smoothly.

Want to follow the full community discussion and troubleshooting tips? Check out the original thread here.

Need a hassle-free Mautic experience without worrying about builds and dependencies? Mailertizer’s hosted Mautic platform handles all this for you so you can focus on marketing, not maintenance.

Share the Post: