I am trying to run a Symfony4 app on production and I am getting the following error:
Uncaught TypeError: Return value of Symfony\\Component\\Dotenv\\Dotenv::populate()
must be an instance of Symfony\\Component\\Dotenv\\void,
none returned in /var/www/html/vendor/symfony/dotenv/Dotenv.php:95
Stack trace:
#0 /var/www/html/vendor/symfony/dotenv/Dotenv.php(57):
Symfony\\Component\\Dotenv\\Dotenv->populate(Array)
#1 /var/www/html/public/index.php(12):
Symfony\\Component\\Dotenv\\Dotenv->load('/var/www/html/s...')
#2 {main}
thrown in /var/www/html/vendor/symfony/dotenv/Dotenv.php on line 95
On local the app is running fine. Once it moves to production, it breaks.
Any idea why this might be happening?