Site crashes after running 'composer install' to update modules My website is running Drupal 8.8.x When upgrading to Drupal 8.9.x and then running 'composer install' on production everything seems to install as expected but the site then goes offline with a 500 error and running any Drush command outputs the below text. I suspect it may be an issue with something in my composer.json file but I have no idea what it could be. I have dozens of other similar Drupal sites and none have this issue.
I've spent a couple of days trying to figure out the cause or a fix without look. Any suggestions?
PHP Warning:  require(/home/WEBSITE/public_html/vendor/composer/../../load.environment.php): failed to open stream: No such file or directory in /home/WEBSITE/public_html/vendor/composer/autoload_real.php on line 73


PHP Warning:  require(/home/WEBSITE/public_html/vendor/composer/../../load.environment.php): failed to open stream: No such file or directory in /home/WEBSITE/public_html/vendor/composer/autoload_real.php on line 73


 PHP Fatal error:  require(): Failed opening required '/home/WEBSITE/public_html/vendor/composer/../../load.environment.php' (include_path='/home/WEBSITE/public_html/vendor/pear/pear_exception:/home/WEBSITE/public_html/vendor/pear/console_getopt:/home/WEBSITE/public_html/vendor/pear/pear-core-minimal/src:/home/ntgitc                                om/public_html/vendor/pear/archive_tar:.:/opt/alt/php73/usr/share/pear') in /home/WEBSITE/public_html/vendor/composer/autoload_real.php on line 73
Your composer.json probably has this in it (many do):
&quot;autoload&quot;: {
  &quot;files&quot;: [
    &quot;load.environment.php&quot;
  ]
}

But you don't have load.environment.php present in the file system.
Either remove the line from composer.json if you don't need to use dotenv, or add the file which typically contains something like this:
&lt;?php
/**
 * This file is included very early. See autoload.files in composer.json and
 * https://getcomposer.org/doc/04-schema.md#files
 */
use Dotenv\Dotenv;
use Dotenv\Exception\InvalidPathException;
/**
 * Load any .env file. See /.env.example.
 */
$dotenv = Dotenv::createImmutable(__DIR__);
$dotenv-&gt;safeLoad();