From 6c23883d9429e96e5eb6995d4f62f1ad6a42c1a6 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 16 Jun 2026 16:04:22 +0200 Subject: [PATCH] Fix InvoiceShelf install/update package manager execution. (#15141) Use Corepack-managed Yarn when available so installs respect upstream packageManager metadata and avoid Yarn classic mismatch failures during both fresh installs and updates. --- ct/invoiceshelf.sh | 10 ++++++++-- install/invoiceshelf-install.sh | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ct/invoiceshelf.sh b/ct/invoiceshelf.sh index e6dee2377..15fa2c368 100644 --- a/ct/invoiceshelf.sh +++ b/ct/invoiceshelf.sh @@ -52,8 +52,14 @@ function update_script() { msg_info "Updating Application" cd /opt/invoiceshelf $STD composer install --no-dev --optimize-autoloader - $STD yarn install - $STD yarn build + if command -v corepack >/dev/null 2>&1; then + $STD corepack enable + $STD corepack yarn install + $STD corepack yarn build + else + $STD yarn install + $STD yarn build + fi $STD php artisan migrate --force $STD php artisan optimize:clear chown -R www-data:www-data /opt/invoiceshelf diff --git a/install/invoiceshelf-install.sh b/install/invoiceshelf-install.sh index 6160c66f5..368fcf6e6 100644 --- a/install/invoiceshelf-install.sh +++ b/install/invoiceshelf-install.sh @@ -39,8 +39,14 @@ sed -i "s|^DB_USERNAME=.*|DB_USERNAME=${PG_DB_USER}|" .env sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=${PG_DB_PASS}|" .env COMPOSER_ALLOW_SUPERUSER=1 $STD composer install --no-dev --optimize-autoloader --no-interaction $STD php artisan key:generate -$STD yarn install -$STD yarn build +if command -v corepack >/dev/null 2>&1; then + $STD corepack enable + $STD corepack yarn install + $STD corepack yarn build +else + $STD yarn install + $STD yarn build +fi mkdir -p storage/framework/{cache,sessions,views} storage/logs bootstrap/cache chown -R www-data:www-data /opt/invoiceshelf chmod -R 775 storage bootstrap/cache