Problem/Motivation

hi i am getting bellow error (more details in attached file) when i try to use the automated update script

Preparing composer.json for Varbase updates...
/app/vendor/vardot/varbase-updater/scripts/update/varbase-updater.sh: line 147: sudo: command not found

In ClassLoader.php line 571:
                                                                                                                                
  include(/app/vendor/composer/../cweagans/composer-patches/src/Patches.php): Failed to open stream: No such file or directory  

Steps to reproduce

./bin/update-varbase.sh from project directory

Thanks

CommentFileSizeAuthor
#2 composer_update error.png73.11 KBdelacosta456

Comments

delacosta456 created an issue. See original summary.

delacosta456’s picture

StatusFileSize
new73.11 KB
rajab natshah’s picture

sudo: command not found

Are you allowed to use sudo on the system?

Updating a Varbase Site

Updating Varbase should always be done in a local or development environment. Once the update process is properly done and tested you can push your code and build to your production site.
DO NOT update Varbase directly when in production.

The Varbase Updater tools requires write permissions to the project directory. Please make sure that the write permissions are active in order for the updater to work.

delacosta456’s picture

hi
unles i am wrong..sudo is not available in my dev environment build with lando.

-- running the script (./bin/update-varbase.sh) directly from my terminal was complaining about php with the messge /usr/bin/env: php: No such file or directory and stopping the process. So i decided to lando ssh inside the container to run the script.(no more **php** msg but now **sudo** ) issue.

Thanks

***EDIT *** And out of that it looks like composer can not access a file.. this is the error (as shown in attached image)

include(/app/vendor/composer/../cweagans/composer-patches/src/Patches.php): Failed to open stream: No such file or directory

rajab natshah’s picture

Title: Error when using ./bin/update-varbase.sh » [Lando] sudo: command not found Error when using bash ./bin/update-varbase.sh

From which version of Varbase you are trying to update?
Using the basic update steps could help if the gap is not too far between versions

composer update -vvv
./bin/drush updb
./bin/drush cr

Try not to use bash ./bin/update-varbase.sh If the site is already on the latest 9.0.13 version.

delacosta456’s picture

hi
yes i am on 9.0.13.
I was doing this because i have schedules that remind me to always keep update all my Drupal instance .

I will try and if no issue will keep in mind for next time to be doing the direct update method (if the gap is not too far between versions)

Thanks

delacosta456’s picture

hi
Did the direct update .. almost everything goes as expect.

Only the default_content module throw two errors:

  • When upgrading the below error
      - Upgrading drupal/default_content (dev-2.0.x 674b4ca => dev-2.0.x 9efd1d5): Failed: [RuntimeException] The .git directory is missing from /app/docroot/modules/contrib/default_content, see https://getcomposer.org/commit-deps for more information
        Update failed (The .git directory is missing from /app/docroot/modules/contrib/default_content, see https://getcomposer.org/commit-deps for more information)
        Would you like to try reinstalling the package instead [yes]? <strong>yes</strong>
    
  • After answering "YES" for reinstalling, a patch did not apply:
    > post-package-update: cweagans\Composer\Patches->postInstall
      - Applying patches for drupal/default_content
        https://www.drupal.org/files/issues/2021-04-07/3160146-37.patch (Issue #3160146: Add Layout Builder Normalizer and Denormalize)
    Downloading https://www.drupal.org/files/issues/2021-04-07/3160146-37.patch
    Testing ability to patch with git apply. This command may produce errors that can be safely ignored.
    git -C '/app/docroot/modules/contrib/default_content' apply --check -v '-p1' '/tmp/647d9cf30557e.patch'
    Executing command (CWD): git -C '/app/docroot/modules/contrib/default_content' apply --check -v '-p1' '/tmp/647d9cf30557e.patch'
    Checking patch src/Normalizer/ContentEntityNormalizer.php...
    
    Hunk #1 succeeded at 23 (offset 1 line).
    
    git -C '/app/docroot/modules/contrib/default_content' apply '-p1' '/tmp/647d9cf30557e.patch'
    Executing command (CWD): git -C '/app/docroot/modules/contrib/default_content' apply '-p1' '/tmp/647d9cf30557e.patch'
    

Thanks

rajab natshah’s picture

Status: Active » Fixed
rajab natshah’s picture

Status: Fixed » Closed (fixed)