Your software
My Mautic version is: 5.0.3
My PHP version is: 8.1.27
My Database type and version is: MariaDB 10.11.6
Your problem
My problem is: I’m trying to install Mautic 5 via recommended Composer
Steps:
Downloaded and unzipped 5.0.3 zip file
composer create-project mautic/recommended-project:^5 mautic --no-interaction => OK
composer install => Error
These errors are showing in the log:
In short:
Field ‘browser’ doesn’t contain a valid alias configuration
From the log:
> mautic@0.0.0 postinstall
> node_modules/modernizr/bin/modernizr -c modernizr-config.json -d node_modules/modernizr/modernizr-mautic-dist.js & npm run build
Modernizr build saved to node_modules/modernizr/modernizr-mautic-dist.js
> mautic@0.0.0 build
> webpack --mode production --config webpack.config.js
[CKEditorTranslationsPlugin] Error: No translation has been found for the en language.
assets by status 1.23 MiB [cached] 1 asset
cached modules 9.81 MiB (javascript) 919 bytes (runtime) [cached] 1615 modules
ERROR in ./app/assets/libraries/ckeditor/src/ckeditor.ts 31:0-40
Module not found: Error: Can't resolve './TokenPlugin' in '/usr/local/www/nginx-dist/mautic.example.com/app/assets/libraries/ckeditor/src'
resolve './TokenPlugin' in '/usr/local/www/nginx-dist/mautic.example.com/app/assets/libraries/ckeditor/src'
using description file: /usr/local/www/nginx-dist/mautic.example.com/package.json (relative path: ./app/assets/libraries/ckeditor/src)
Field 'browser' doesn't contain a valid alias configuration
using description file: /usr/local/www/nginx-dist/mautic.example.com/package.json (relative path: ./app/assets/libraries/ckeditor/src/TokenPlugin)
no extension
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/nginx-dist/mautic.example.com/app/assets/libraries/ckeditor/src/TokenPlugin doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/nginx-dist/mautic.example.com/app/assets/libraries/ckeditor/src/TokenPlugin.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/nginx-dist/mautic.example.com/app/assets/libraries/ckeditor/src/TokenPlugin.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/usr/local/www/nginx-dist/mautic.example.com/app/assets/libraries/ckeditor/src/TokenPlugin.json doesn't exist
as directory
/usr/local/www/nginx-dist/mautic.example.com/app/assets/libraries/ckeditor/src/TokenPlugin doesn't exist
webpack 5.88.2 compiled with 1 error in 3870 ms
npm ERR! code 1
npm ERR! path /usr/local/www/nginx-dist/mautic.example.com
npm ERR! command failed
npm ERR! command sh -c node_modules/modernizr/bin/modernizr -c modernizr-config.json -d node_modules/modernizr/modernizr-mautic-dist.js & npm run build
Steps I have tried to fix the problem:
I have tried to clean cache and reinstall Mautic
I have executed: npx update-browserslist-db@latest
… I’m not a JavaScript/NPM/Webpack/Modernizer expert,
so I’m not sure how to fix this error.
Hello
I have this problem in Mautic5 installation, can any one help me to resolve this issue
1 - Install web server environment with PHP8.2
2- download and install with composer : composer result is good
3 - in my Navigator I have the message to downgrade the earlier version of PHP
4- I have installed the PHP8.1 in the same server
==> Result : 500 error
Root composer.json requires mautic/core-lib 5.0.0-rc1 → satisfiable by mautic/core-lib[5.0.0-rc1].
mautic/core-lib 5.0.0-rc1 requires ext-zip * → it is missing from your system. Install or enable PHP’s zip extension.
Problem 2
mautic/core-lib 5.0.0-rc1 requires ext-zip * → it is missing from your system. Install or enable PHP’s zip extension.
mautic/theme-trulypersonal 5.0.0-rc1 requires mautic/core-lib ^5.0 → satisfiable by mautic/core-lib[5.0.0-rc1].
Root composer.json requires mautic/theme-trulypersonal 5.0.0-rc1 → satisfiable by mautic/theme-trulypersonal[5.0.0-rc1].
To enable extensions, verify that they are enabled in your .ini files:
/etc/php/8.3/cli/php.ini
/etc/php/8.3/cli/conf.d/10-mysqlnd.ini
/etc/php/8.3/cli/conf.d/10-opcache.ini
/etc/php/8.3/cli/conf.d/10-pdo.ini
/etc/php/8.3/cli/conf.d/15-xml.ini
/etc/php/8.3/cli/conf.d/20-calendar.ini
/etc/php/8.3/cli/conf.d/20-ctype.ini
/etc/php/8.3/cli/conf.d/20-dom.ini
/etc/php/8.3/cli/conf.d/20-exif.ini
/etc/php/8.3/cli/conf.d/20-ffi.ini
/etc/php/8.3/cli/conf.d/20-fileinfo.ini
/etc/php/8.3/cli/conf.d/20-ftp.ini
/etc/php/8.3/cli/conf.d/20-gettext.ini
/etc/php/8.3/cli/conf.d/20-iconv.ini
/etc/php/8.3/cli/conf.d/20-imap.ini
/etc/php/8.3/cli/conf.d/20-mbstring.ini
/etc/php/8.3/cli/conf.d/20-mysqli.ini
/etc/php/8.3/cli/conf.d/20-pdo_mysql.ini
/etc/php/8.3/cli/conf.d/20-phar.ini
/etc/php/8.3/cli/conf.d/20-posix.ini
/etc/php/8.3/cli/conf.d/20-readline.ini
/etc/php/8.3/cli/conf.d/20-shmop.ini
/etc/php/8.3/cli/conf.d/20-simplexml.ini
/etc/php/8.3/cli/conf.d/20-sockets.ini
/etc/php/8.3/cli/conf.d/20-sysvmsg.ini
/etc/php/8.3/cli/conf.d/20-sysvsem.ini
/etc/php/8.3/cli/conf.d/20-sysvshm.ini
/etc/php/8.3/cli/conf.d/20-tokenizer.ini
/etc/php/8.3/cli/conf.d/20-xmlreader.ini
/etc/php/8.3/cli/conf.d/20-xmlwriter.ini
/etc/php/8.3/cli/conf.d/20-xsl.ini
You can also run php --ini in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with --ignore-platform-req=ext-zip to temporarily ignore these required extensions.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.