Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find autoload file - drupal-composer/drupal-project (solved) #134

Closed
2 of 4 tasks
star-szr opened this issue Feb 12, 2020 · 1 comment
Closed
2 of 4 tasks

Comments

@star-szr
Copy link

Just posting in case it can help someone else.

How is drupal-check installed?

  • drupal-check is installed using the phar
  • drupal-check is installed globally via Composer
  • drupal-check is installed globally using consolidation/cgr
  • drupal-check is installed as a dependency to my project

I tested both phar and cgr methods, uninstalling in between.

Environment:

  • OS: macOS
  • PHP Version: 7.2.27
  • Drupal core: 8.8.1

Describe the bug

This project is based on a modified version of https://github.com/drupal-composer/drupal-project

drupal-check seems to be having trouble finding the vendor directory.

Relative to my CWD, the docroot is at ./web and vendor is at ./vendor

The ./web/vendor directory doesn't exist.

Console output

drupal-check -vvv web/modules/custom

Current working directory: /Users/Me/Sites/foo.localhost
Using Drupal root: /Users/Me/Sites/foo.localhost/web
Using vendor root: /Users/Me/Sites/foo.localhost/web/vendor
Could not find autoload file.

Solution

In this case, the culprit was a stray and empty composer.json in the Drupal root. After deleting ./web/composer.json, drupal-check works as expected.

@andreasemer
Copy link

Thank you very much, that helped me! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants