-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Solution and details
If you experience failed to open stream: No such file or directory or Plugin initialization failed or class not found type of issue, and are using VirtualBox / Vagrant, this is caused by the VirtualBox filesystem being buggy and not allowing access to the files right after they have been written (https://www.virtualbox.org/ticket/8761).
The workaround we implemented is the following:
If Composer:
- runs as user
vagrant - or Composer runs on a Linux machine where lsmod lists vboxguest (virtualbox guest additions)
- or you set the
COMPOSER_RUNTIME_ENVenvironment variable tovirtualbox
then Composer does very short sleep() calls right before plugins are initialized to give the filesystem some time to properly acknowledge the files are there, so that the plugins can be initialized.
Initial issue:
[ErrorException]
md5_file(./coffee.api.php): failed to open stream: No such file or directory
This error is only an example for a lot of different error messages of Composer 2 when using it in the Virtual Machine (Drupal VM, drupalvm.com).
Composer has massive problem with the files in the shared folders (virtualbox).
Is there any new dev version that solves the problems? The problem exists for many years.