Could not scan for classes inside "myproject/vendor/drupal/lightning_api/src/LightningApiServiceProvider.php" which does not appear to be a file nor a folder

Created on 23 August 2023, 10 months ago

In preparation for upgrading to Drupal10, I want to upgrade lightning_media to 4.10, my current version is 4.6. I used the following command:

composer require 'drupal/lightning_media:^4.10'

But will get an error:
Generating autoload files

In ClassMapGenerator.php line 129:

Could not scan for classes inside "/var/www/myproject/vendor/drupal/lightning_api/src/LightningApiServiceProvider.php" which does not appear to be a file nor a folder

In addition, if any composer command is used again, an error will be reported:
In AutoloadGenerator.php line 1344:

require(/var/www/myproject/vendor/drupal/core/includes/bootstrap.inc): Failed to open stream: No such file or directory

I've been stuck on this problem for two days, can someone help me out?

πŸ› Bug report
Status

Active

Version

4.10

Component

Code

Created by

πŸ‡¨πŸ‡³China jimmyj

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jimmyj
  • πŸ‡¨πŸ‡³China jimmyj

    I also tried upgrading to 5.0, but got the same error.

  • πŸ‡¨πŸ‡³China jimmyj

    I have solved that issue. The root cause is the upgrading of lightning_media will delete this:"composer/installers".
    To prevent that, use this command " composer require composer/installers" before the update the lightning_media .

Production build 0.69.0 2024