While setting up a new Drupal 10 site with composer, installing the first module using composer causes a 500 (internal server error) for all pages. This is my first time installing any version of Drupal through composer or installing modules through composer. I've previously installed other Drupal versions (6, 7, and 8) and modules without issue, but without using composer.
Drupal 10.2.3 was installed with
/usr/bin/php8.2-cli ../composer.phar create-project drupal/recommended-project sitename
The installation with composer proceeded normally (no errors). The subsequent Drupal install was normal. I was able to log into the new site and perform some minimal configuration through the Drupal admin ui.
My next step was to install the PathAuto module with
/usr/bin/php8.2-cli ../composer.phar require 'drupal/pathauto:^1.12'
Composer reported PathAuto as installed. Indeed, checking the file system showed that PathAuto was installed in
../web/modules/contrib/pathauto along with the dependencies of CTools and Token.
Refreshing any page in the browser immediately displays the 500 error.
In some cases, the 500 error is related to needing to uncomment
RewriteBase / in
.htaccess, which I've done.
I tried removing PathAuto with
/usr/bin/php8.2-cli ../composer.phar remove 'drupal/pathauto:^1.12'
Composer reported "... has not been removed."
I don't have access to the server's logs; it's a shared hosting provider.
Very few of the articles I've read and questions posted here deal with composer and Drupal 10. Of those that do, most seem to be concerned with issues related to upgrades.
Clearly, I've missed something.
What have I missed? What additional information would help troubleshoot?
I don't have a lot of time invested in setting up this site as of now, so if the answer is "start over", that's okay.