Composer install errors

I had manually downloaded SuiteCRM v7.11.19 and been working on customizing it as per Client requirements. In setting up the API (https://docs.suitecrm.com/developer/api/developer-setup-guide/json-api/#_before_you_start_calling_endpoints), I tried to run composer install and ran into the errors below. Not sure what to make of it. I have newer version of the library than what’s required by composer.json.

  1. Do I even need to run composer install to use the API?

  2. If yes, then how can I fix the error?

    composer install
    The “wikimedia/composer-merge-plugin” plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation (“2.1.0”). You may need to run composer update with the “–no-plugins” option.
    Installing dependencies from lock file (including require-dev)
    Verifying lock file contents can be installed on current platform.
    Your lock file does not contain a compatible set of packages. Please run composer update.
    Problem 1
    - wikimedia/composer-merge-plugin is locked to version v1.4.1 and an update of this package was not requested.
    - wikimedia/composer-merge-plugin v1.4.1 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint.

I don’t think you need composer if you download from here.

If you are at windows, you can follow this Video

https://www.youtube.com/watch?v=v3n68J8u_Eg

I’m having the same issue
trying to create an fpm-alpine docker image

have the following so far in my Dockerfile

FROM php:8.0-fpm-alpine
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
RUN    apk add --no-cache zlib-dev libpng-dev imap-dev libzip-dev icu-dev \
    && docker-php-ext-install gd imap zip intl \
    && wget -qO- https://github.com/salesagility/SuiteCRM/archive/v${SUITECRM_VERSION:-7.11.22}.zip \
    | unzip -d /var/www/ -
RUN for x in \
      /var/www/SuiteCRM-${SUITECRM_VERSION:-7.11.22}/* \
      /var/www/SuiteCRM-${SUITECRM_VERSION:-7.11.22}/.[!.]* \
      /var/www/SuiteCRM-${SUITECRM_VERSION:-7.11.22}/..?*; \
    do if [ -e "$x" ]; then mv -- "$x" /var/www/html; fi done \
    && chown -R www-data:www-data /var/www/html \ 
    && rm -rf /var/www/SuiteCRM-${SUITECRM_VERSION:-7.11.22}
WORKDIR /var/www/html

when jumping into the container using the sh shell and trying to run
php -r "\$_SERVER['HTTP_HOST'] = 'localhost'; \$_SERVER['REQUEST_URI'] = 'install.php';\$_REQUEST = array('goto' => 'SilentInstall', 'cli' => true);require_once 'install.php';";
which can be found here which was linked here

I get the following message
Composer autoloader not found. please run "composer install"
when running composer install it complains that there is an issue with the version for composer-plugin-api and that you should try running composer update but this also fails.

is this all because I am trying to install from the packages at github?

I was thinking of fetching suitecrm from the website but the github links are the easiest to use (just need to change the version number)

I have managed to solve the issues with composer.
Not sure if it has been documented or not but SuiteCRM does not work with Composer V2

you need to use Composer V1

1 Like