localgovdrupal / localgov

Installation profile for the LocalGov Drupal distribution.
GNU General Public License v2.0
83 stars 19 forks source link

Install of drupal/core failed #763

Open Ceepster14 opened 3 months ago

Ceepster14 commented 3 months ago

I'm trying to install using lando on a 16GB Windows 11 machine and while running 'lando composer install' I can't get it to go beyond the install of drupal/core.

I get a variety or errors from Filesystem.php such as:

Could not delete /app/vendor/composer/a96d5802/drupal-core-10e79c6/modules/content_translation/tests/src:

It's not always the same file, but all the errors are to do with it failing to delete something.

I've tried the following:

Ensuring the permissions in the app vendor are correct Giving PHP unlimited memory Giving Composer unlimited time to run

But still I can't get it to perform the install.

Anyone got any suggestions?

millnut commented 3 months ago

Hi @Ceepster14 have you tried setting composer's process timeout to a higher value? Sometimes when it hits this it sometimes fails back to strange errors like those?

Ceepster14 commented 3 months ago

Yes @millnut, I'd already added "process-timeout":0, to the composer.json, to prevent a timeout, but sadly that didn't solve anything.

Ceepster14 commented 3 months ago

@millnut OK, came back at your suggestion another way round. I removed the process timeout setting from the composer.json file and instead did the following:

ran composer config process-timeout 6000 and then ran the lando composer install

after a looooong time, I finally managed to complete the composer install.

So, yes, it looks like it was a timeout issue. Thanks for your suggestion

stephen-cox commented 3 months ago

@Ceepster14 How are you running Composer? I have found running it in WSL2 on a mapped drive (i.e. somewhere in your user folder) to be so slow as to be unusable. Running it in a directory in the Linux VM is much faster.

Ceepster14 commented 3 months ago

Hi @stephen-cox , indeed everything is painfully slow in WSL2. I'll have to look into other options.

The mad thing is, I've got a perfectly good local Dev environment using Laravel Herd (which is fantastic BTW) but I couldn't find a sensible setup guide for getting everything running just using a straightforward git clone, hence going down the Lando / Docker route

stephen-cox commented 3 months ago

If you git checkout and run composer in the home directory of of the WSL2 VM rather than your mounted Windows folder it should run fine.

I don't have a WSL2 setup to hand as I use Linux, but if you do a cd ~ and then follow the LGD install instructions it should run fine. You will then have the issue of how to edit the files in an IDE, if you're doing dev.