After updating composer to v1 to v2, my build on heroku is failing, error message :
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!! PHP Fatal error: Uncaught Symfony\Component\Dotenv\Exception\PathException: Unable to read the "/tmp/build_2f06b5cf/.env" environment file. in /tmp/build_2f06b5cf/vendor/symfony/dotenv/Dotenv.php:569
!! Stack trace:
!! #0 /tmp/build_2f06b5cf/vendor/symfony/dotenv/Dotenv.php(92): Symfony\Component\Dotenv\Dotenv->doLoad()
!! #1 /tmp/build_2f06b5cf/vendor/symfony/dotenv/Dotenv.php(114): Symfony\Component\Dotenv\Dotenv->load()
!! #2 /tmp/build_2f06b5cf/vendor/symfony/dotenv/Dotenv.php(157): Symfony\Component\Dotenv\Dotenv->loadEnv()
!! #3 /tmp/build_2f06b5cf/vendor/symfony/runtime/SymfonyRuntime.php(102): Symfony\Component\Dotenv\Dotenv->bootEnv()
!! #4 /tmp/build_2f06b5cf/vendor/autoload_runtime.php(23): Symfony\Component\Runtime\SymfonyRuntime->__construct()
!! #5 /tmp/build_2f06b5cf/bin/console(11): require_once('...')
!! #6 {main}
!! thrown in /tmp/build_2f06b5cf/vendor/symfony/dotenv/Dotenv.php on line 569
!!
Script @auto-scripts was called via post-install-cmd
! ERROR: Dependency installation failed!