# Composer 7.2.2 Install fails

**URL:** <https://forum.mautic.org/t/composer-7-2-2-install-fails/38700>\
**Category:** Product Support\
**Created:** [October 31, 2026, 7:56pm UTC](https://forum.mautic.org/t/composer-7-2-2-install-fails/38700 "2026-10-31T19:56:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam5532](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adam5532/32/12643_2.png) [@adam5532](https://forum.mautic.org/u/adam5532)\
**Post date:** [October 31, 2026, 7:56pm UTC](https://forum.mautic.org/t/composer-7-2-2-install-fails/38700/1 "2026-10-31T19:56:18Z")

</div>

**Your software**  
My Mautic version is: 7.2.2  
My PHP version is: 8.4  
My Database type and version is: MariaDB 11.4

**Your problem**  
My problem is: Unable to enter site and complete installer steps / database connection after running composer recommended project.

“mautic The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator. after installing”

These errors are showing in the log:  
[2026-10-31T19:01:56.363798+00:00] mautic.ERROR: Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template (“The file /mysite.com/mautic/var/sass/app.output.css doesn’t exist, run php bin/console sass:build”)

Tried to run sass:build got error.

Downloaded Mautic 7.2.2 zip and copied over missing /var/sass and /var/dart-sass folders  
Ran sass:build and it completed.

Got 504 Gateway Time-out, checked log again:

[2026-10-31T19:20:09.085773+00:00] app.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: "An exception has been thrown during the rendering of a template ("These files are missing: /mysite.com/mautic/node\_modules/mousetrap/mousetrap.js, /mysite.com/mautic/node\_modules/jquery/dist/jquery.js, /mysite.com/mautic/node\_modules/jquery-form/src/jquery.form.js,

There is no /mautic/node\_modules directory created after running the composer installer, nor does this directory exist in the zip file download either.

It would seem that the installer is missing files/directories that are supposed to be there.

---

<div class="post-metadata">

**Author:** ![alexzlobin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexzlobin/32/13606_2.png) [@alexzlobin](https://forum.mautic.org/u/alexzlobin)\
**Post date:** [October 31, 2026, 9:34pm UTC](https://forum.mautic.org/t/composer-7-2-2-install-fails/38700/2 "2026-10-31T21:34:29Z")

</div>

Hi Adam,

The two errors point to an incomplete Composer post-install process rather than a database or Mautic configuration problem.

For the `mautic/recommended-project` installation, Composer is expected to run several post-install steps:

1. install the JavaScript dependencies with `npm ci`;
2. apply the package patches;
3. build the Mautic assets, including `var/sass/app.output.css`;
4. install the generated assets into the configured web root.

In a clean Composer-based 7.2.2 installation, `var/sass/app.output.css` and `var/dart-sass/sass` are generated as part of this process. The `node_modules` directory is used during the build and does not necessarily need to remain after a successful deployment, but it must be available while the assets are being generated.

This explains the sequence in your logs:

- the missing `var/sass/app.output.css` error means the asset build did not finish;
- copying the `var` directories from the ZIP can remove that first error, but it does not install the JavaScript dependencies;
- the later error about missing `mousetrap`, `jquery`, and `jquery-form` files shows that `mautic:assets:generate` is still trying to read dependencies from `node_modules`.

Please run the commands from the Composer project root — the directory containing `composer.json` and `bin/console`— and make sure that Node.js and npm are installed and available to the same user that runs Composer:

```auto
node --version
npm --version
composer --version

```

If the installation was originally run with `--no-scripts`, or if one of the post-install steps failed, run:

```auto
composer run-script post-install-cmd

```

Alternatively, the individual steps can be run explicitly:

```auto
npm ci --prefer-offline --no-audit
npx patch-package
php bin/console mautic:assets:generate
php bin/console assets:install --symlink --relative docroot/

```

Do not run these commands from inside `docroot`; run them from the project root.

Afterwards, verify that the generated files exist:

```auto
test -s var/sass/app.output.css
test -x var/dart-sass/sass
find docroot/assets/build -type f | head
test -f docroot/media/css/app.css

```

The 504 response is also consistent with an asset-generation process timing out. It is not evidence of a database failure by itself.

If the commands still fail, please provide the complete terminal output from `composer install` or `composer run-script post-install-cmd`, especially the first npm or asset-generation error. The Mautic application log usually only shows the final missing-file symptom and not the original Composer failure.

If the hosting environment does not provide Node.js/npm or does not allow Composer scripts to run, the recommended approach is to build the Composer installation in a separate build/staging environment and deploy the completed generated assets, or use the official ZIP package. Simply copying only `var/sass` from the ZIP will not be sufficient because the JavaScript dependencies are also required during asset generation.

---

<div class="post-metadata">

**Author:** ![adam5532](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adam5532/32/12643_2.png) [@adam5532](https://forum.mautic.org/u/adam5532)\
**Post date:** [November 2, 2026, 1:34am UTC](https://forum.mautic.org/t/composer-7-2-2-install-fails/38700/3 "2026-11-02T01:34:56Z")

</div>

I installed node.js and nvm. BTW, in the docs ([Installation — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/7.2/getting_started/how_to_install_mautic.html)) I do not see any mention of needing them to be installed.

I concluded that it made more sense to just do another clean install rather than fix this one. It installed fine this time!

I let it install a new empty db (v7.2.2), then renamed my old one to the new name (v7.2.1) and ran the following commands:

php bin/console cache:clear  
php bin/console mautic:update:find  
php bin/console mautic:update:apply  
php bin/console mautic:update:apply --finish

My contacts, segments, and emails all look good.

However, it did not bring over my configuration:email settings (and possibly other settings), so I’m assuming that these settings are stored in a file and not in the database. I could recreate them, but what file could I copy over from my previous 7.2.1 installation into my new 7.2.2 installation to bring in those settings?

Thanks

---

<div class="post-metadata">

**Author:** ![alexzlobin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexzlobin/32/13606_2.png) [@alexzlobin](https://forum.mautic.org/u/alexzlobin)\
**Post date:** [November 2, 2026, 7:45am UTC](https://forum.mautic.org/t/composer-7-2-2-install-fails/38700/4 "2026-11-02T07:45:30Z")

</div>

Node.js and NVM are not required for a normal production installation from the official ZIP package. They are mainly needed when building frontend assets from the source repository. The current installation documentation describes ZIP and Composer installation without requiring Node.js, so this prerequisite should be clarified only for source/development workflows. [Installation documentation](https://docs.mautic.org/en/7.2/getting_started/how_to_install_mautic.html)

Mautic configuration is not stored entirely in the database. Email transport settings and other local instance parameters are stored in the local configuration file.

For a current Composer-based Mautic 7 installation, check:

```auto
config/local.php

```

In older or non-Composer layouts, the file may instead be:

```auto
app/config/local.php

```

Copy or merge the relevant configuration from the previous installation, especially the mailer settings. Do not overwrite the new file blindly: verify the database name, database user, password, site URL, paths, and `secret_key` first. The configuration file contains credentials and encryption-related settings, so keep its permissions restricted.

After changing the configuration, clear the cache:

```auto
php bin/console cache:clear

```

Also remember that plugins, uploaded media, custom themes, and translations are separate from the database and may need to be copied from the old installation if they were not included in the new one. The database migration commands you ran are appropriate only after confirming that the new code is connected to the intended backup database and that a backup is available.
