Skip to content
This repository was archived by the owner on Aug 13, 2018. It is now read-only.

Fatal error: Class 'Dotenv\Dotenv' not found in ACFProInstaller/Plugin.php #2

Open
davidohlin opened this issue Mar 14, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@davidohlin
Copy link
Contributor

When running vagrant provision for the first time Composer fails to install ACF with the following error:

PHP Fatal error:  Uncaught Error: Class 'Dotenv\Dotenv' not found in /srv/www/nyheter.test/current/vendor/philippbaschke/acf-pro-installer/src/ACFProInstaller/Plugin.php:246
Stack trace:
#0 /srv/www/nyheter.test/current/vendor/philippbaschke/acf-pro-installer/src/ACFProInstaller/Plugin.php(226): PhilippBaschke\ACFProInstaller\Plugin->loadDotEnv()
#1 /srv/www/nyheter.test/current/vendor/philippbaschke/acf-pro-installer/src/ACFProInstaller/Plugin.php(144): PhilippBaschke\ACFProInstaller\Plugin->getKeyFromEnv()
#2 [internal function]: PhilippBaschke\ACFProInstaller\Plugin->addKey(Object(Composer\Plugin\PreFileDownloadEvent))
#3 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(171): call_user_func(Array, Object(Composer\Plugin\PreFileDownloadEvent))
#4 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(81): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Plugin\PreFileDownloadEvent))
#5 phar:///usr/local/bin/composer/src/Composer/Downloader/FileDownlo in /srv/www/nyheter.test/current/vendor/philippbaschke/acf-pro-installer/src/ACFProInstaller/Plugin.php on line 246

Fatal error: Uncaught Error: Class 'Dotenv\Dotenv' not found in /srv/www/nyheter.test/current/vendor/philippbaschke/acf-pro-installer/src/ACFProInstaller/Plugin.php:246
Stack trace:
#0 /srv/www/nyheter.test/current/vendor/philippbaschke/acf-pro-installer/src/ACFProInstaller/Plugin.php(226): PhilippBaschke\ACFProInstaller\Plugin->loadDotEnv()
#1 /srv/www/nyheter.test/current/vendor/philippbaschke/acf-pro-installer/src/ACFProInstaller/Plugin.php(144): PhilippBaschke\ACFProInstaller\Plugin->getKeyFromEnv()
#2 [internal function]: PhilippBaschke\ACFProInstaller\Plugin->addKey(Object(Composer\Plugin\PreFileDownloadEvent))
#3 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(171): call_user_func(Array, Object(Composer\Plugin\PreFileDownloadEvent))
#4 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(81): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Plugin\PreFileDownloadEvent))
#5 phar:///usr/local/bin/composer/src/Composer/Downloader/FileDownlo in /srv/www/nyheter.test/current/vendor/philippbaschke/acf-pro-installer/src/ACFProInstaller/Plugin.php on line 246

The solution right now is to delete ./site/vendor/, run composer update and composer install. Roots claims this error is fixed in Composer 1.6.2, but that doesn't seem to be true ¯_(ツ)_/¯

@davidohlin davidohlin added the bug Something isn't working label Mar 14, 2018
@davidohlin
Copy link
Contributor Author

ACF installer when deploying gets the same problem when deploying for the first time. Follow these instructions for a temporary fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant