Why Mautic 7.2.2 Composer Install May Fail and How to Fix Missing Assets

If you’ve tried installing Mautic 7.2.2 using Composer and ended up locked out with a “site offline” error, you’re not alone. A user on the Mautic community forum just reported a frustrating issue where the installer fails to create essential asset folders, like node_modules, which are needed for things like JavaScript and CSS to work properly. Without these, you’re stuck with errors about missing files such as mousetrap.js, jquery.js, and problems running php bin/console sass:build.

This problem boils down to how the Mautic 7.2.2 package is assembled—or not assembled—when installing via Composer. The user found that the Composer installer doesn’t generate the node_modules directory, and the zip package they downloaded didn’t include it either. Normally, node_modules is created by running npm or yarn to install frontend dependencies, but Mautic’s installation docs gloss over this or expect it to be done before packaging.

Attempts to manually run the Sass build command (php bin/console sass:build) ran into timeouts and errors, and copying missing folders from a fresh download only partly helped. The core issue is that the frontend assets aren’t compiled automatically during install, leaving Mautic broken until you handle it yourself.

Unfortunately, there’s no official fix or update alerting users about this in the Mautic repo or forums yet. If you’re comfortable with development tools, the workaround is to clone the Mautic repo, run npm install or yarn install, then build assets via npm run build or the equivalent script. This compiles and populates the node_modules folder and CSS assets, after which Mautic will load properly.

For less technical users, this is a major headache and definitely not how you want installing Mautic to feel. Community feedback suggests the packaging process might need a rethink to include pre-built assets or clearer install instructions for PHP 8+ environments, since missing these frontend files basically bricks the site.

The takeaway? If you’re self-hosting Mautic and rely on Composer installs, be ready to jump into frontend build tools to fix this one, or stick with older stable versions until the packaging improves. And if you’re looking for a hassle-free Mautic experience, hosted platforms like Mailertizer handle all this complexity behind the scenes so you don’t have to.

Check out the full Mautic forum discussion here for ongoing community input and updates.

Share the Post: