I would like to update the plugin so I run Composer on the Vagrant box.
From my Trellis directory i run:
I received this error in the console
and when I tried to see the local website I see this
unfortunately, we need to go live tomorrow, is there a quick fix for this?
my composer file is this one:
i am sorry for this panic post, but as I said we are supposed to go live tomorrow
any help would be super helpful
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.
Shouldn’t trellis check for HTTP 200 before permanently switching the current symlink to the new release?
Trellis does ensure
composer install successful before symlink
during deploy (i.e.:
composer install directly inside vagrant VM does not. because ansible is not being invoked.
i followed this solution
Composer 1.6.2 is out which fixes this bug. If you re-provision your server you should get the new version. If you made the edits originally listed below, remove them first.
Your main config should have this setting:
reprovision your server (ansible-playbook server.yml -e env=<environment> --tags "composer")
re-deploy your site
For development, run this: ANSIBLE_TAGS=composer vagrant provision.
SummaryTo sum this…
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*
am I missing something?
what else I can try to do?
i tried also to remove the
vendor directory from /site/ and running
composer update again.
From my Trellis directory:
but i get a new error
Could not delete web/wp/wp-admin/css/about-rtl.css:
any suggestion would be great
You could try deleting the
web/wp directory manually. Composer should reinstall it.
@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
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
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
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
From my Trellis directory:
This topic was automatically closed after 42 days. New replies are no longer allowed.