Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Class 'Dotenv\Environment\DotenvFactory' not found #6

Closed
ingenuityon opened this issue May 1, 2019 · 3 comments
Closed

Comments

@ingenuityon
Copy link

I have no idea why this keeps coming up, I've tried everything I can find from others who've had this issue (albeit in other packages). The issue triggers in: vendor/illuminate/support/helpers.php:646

Stack trace:
#0 /Applications/MAMP/htdocs/auth/config/app.php(4): env('APP_ENV', 'development')
#1 /Applications/MAMP/htdocs/auth/vendor/hassankhan/config/src/FileParser/Php.php(31): require('/Applications/M...')
#2 /Applications/MAMP/htdocs/auth/vendor/hassankhan/config/src/Config.php(69): Noodlehaus\FileParser\Php->parse('/Applications/M...')
#3 /Applications/MAMP/htdocs/auth/bootstrap/app.php(28): Noodlehaus\Config->__construct('/Applications/M...')
#4 /Applications/MAMP/htdocs/auth/vendor/pimple/pimple/src/Pimple/Container.php(118): {closure}(Object(Slim\Container))
#5 /Applications/MAMP/htdocs/auth/bootstrap/container.php(113): Pimple\Container->offsetGet('config')
#6 /Applications/MAMP/htdocs/auth/vendor/pimple/pimple/src/Pimple/Container.php(118): {closure}(Object(Slim\Container))
#7 /Applications/MAMP/htdocs/auth/bootstrap/app.php(37): Pimple\Container->offsetG in /Applications/MAMP/htdocs/auth/vendor/illuminate/support/helpers.php on line 646

Does anyone know how to fix this?

@ingenuityon
Copy link
Author

I found a work around... I was using the latest php 7.1.28, which constantly caused the issue above. I downgraded php to 5.6.40 and re-installed and everything worked. I noticed there was a mention of issues with 7.2, but the issue above seems to start at some point in the 7.1.x series

@rubensrocha
Copy link
Contributor

Open composer.json go to this line "vlucas/phpdotenv": "^2.3", and change 2.3 to 3

Run composer update

Open bootstrap/app.php and change this line

$env = new Dotenv(__DIR__ . '/../');

to this one

$env = Dotenv::create(__DIR__ . '/../');

@devsavage
Copy link
Owner

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants