Reputation: 319
I am trying to autoload a Github repository with the following config in the composer.json file
"repositories": [
{
"type":"package",
"package": {
"name": "webdevstudios/taxonomy-single-term",
"version":"0.2.2",
"dist": {
"url": "https://github.com/WebDevStudios/Taxonomy_Single_Term/archive/master.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/WebDevStudios/Taxonomy_Single_Term.git",
"type": "git",
"reference":"master"
},
"autoload": {
"files": ["class.taxonomy-single-term.php", "walker.class.taxonomy-single-term.php"]
}
}
}
],
When run composer update/dumpautoload, I get the following error:
[RuntimeException]
Could not scan for classes inside "project1/vendor/
webdevstudios/taxonomy-single-term/taxonomy-single-term/" which does not appear to be a file nor a
folder
Am I missing any specific configuration for the autoload, because "classmap", "psr-0" or any other configuration doesnt work.
Thanks for the help.
PS: the source files exist i "project1/vendor/
webdevstudios/taxonomy-single-term/". Not sure why I am getting the extra "taxonomy-single-term".
Upvotes: 0
Views: 3648
Reputation: 1
Usually, this happens when you have some corrupted files or any composer update has crashed or interrupted.
To solve, just delete the vendor folders and run composer install
Upvotes: -1
Reputation: 319
I was able to resolve the issue. Deleted the vendor folder and composer.lock and ran composer install again. This time everything loaded properly.
Upvotes: 1