A quick search for the error and you can see others with a similar issue. I know the versions are different but try the solutions there as they should be what you need.
Trellis does ensure composer install successful before symlink during deploy (i.e.: $ ./bin/deploy.sh).
However, running composer install directly inside vagrant VM does not. because ansible is not being invoked.
so I ran: ANSIBLE_TAGS=composer vagrant provision from my trellis local directory.
but I have still have the same errors:
( ! ) Fatal error: Uncaught Error: Class 'Dotenv\Dotenv' not found in /srv/www/domain.co.uk/current/config/application.php on line *17*
( ! ) Error: Class 'Dotenv\Dotenv' not found in /srv/www/domain.co.uk/current/config/application.php on line *17*
thanks @MWDelaney for your reply, i tried also remove web/wp directory manually.
now the problem is ACF plugin, can I remove also this manually or I will lose something?
basically, I can remove all the directories manually, until the composer install will finish with a success message, or there is something that it is better to don’t delete manually?
looking at the console output, I am wondering if there is a problem with the cache.
is it normal that composer install these packages loading from cache?
Obviously don’t delete any plugins or packages you maintain manually, but if all your plugins are managed with composer I say just blow away everything in vendor and plugins, run composer clear-cache and try composer install again.
@MWDelaney you are my hero
i finally have my development site working again, thanks for your suggestions, very helpful.
looking at the git unstaged files, the only thing that I changed is a line in the requirements.yml file in the trellis directory. (found this solution here)
Should I do the re-provision of the staging/production after this update?
For future reference, if anybody will run into the same problem, these are the steps. (thanks to @MWDelaney)
For development , run this: ANSIBLE_TAGS=composer vagrant provision(see this topic)
Manually delete the vendor folder, the web/wp and the plugins that you manage with composer