-1

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!
Dezz H
  • 322
  • 6
  • 23
  • sure that the update didn't change the file permissions on the tmp folder? did you try to clear the cache? – LBA Jul 06 '22 at 12:40
  • 1
    @LBA localy my app runs perfectly, i doubt the permissions to the file is change i dont have a tmp directory on my local app. After depoying on Heroku, the deployment process launches a cache:clear that Fails – Dezz H Jul 06 '22 at 12:44

1 Answers1

0

the symfony/dotenv was required i mistakenly put it in the wrong config, composer require --dev symfony/dotenv removed it from the require bracket and added it to the require --dev

Dezz H
  • 322
  • 6
  • 23