Mautic Composer Update to 5.2.6 fails with npx patch-package Unexpected token

Your software
My Mautic version is: Updating to 5.2.6
My PHP version is: 8.1.32
My Database type and version is: MySQL 8.0.42

Your problem
My problem is:

Updating with composer works until npx patch-package comes up. Then it fails.

Error Message:

npx patch-package
Unexpected token .
Script npx patch-package handling the npx-patch-package event returned with error code 1
Script @npx-patch-package was called via post-update-cmd

These errors are showing in the log:

No entries in log file.

Steps I have tried to fix the problem:

  • Checked the npm module versions with the package.json of Mautic and all are okay.
  • reinstalled patch-package
  • updated composer
  • updated node to v22.16.0 and npm to 10.9.2
  • tried different node.js versions, but issue persists.
  • checked JSON files for format errors => nothing found.
  • run npm audit and npm audit fix, but did not change anything.
  • tried some bin/console commands, but nothing changed anything.

Last time, it worked to use the latest node.js version. But this time it does not even work with the latest version.

Any idea about how to get the update to finish are welcome.

Thanks!

As I don’t have a solution for now, I rolled back to version 5.2.3.

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