Reputation: 142
I have quite a weird problem. I'm using 5.4 version of laravel, currently working from my notebook windows 10, on the other devices mac and pc I do not have this problem.
So, the problem is when i try to seed the database I get this strange error which says
[ErrorException] include(C:\Users\nathaniel\Desktop\LaraProjects\cms\vendor\composer/../../atabase/seeds/DatabaseSeeder.php): failed to o pen stream: No such file or directory
As you can see instead of \database it's saying \atabase and I have no clue why. While doing php artisan migrate:refresh --seed migrates everything but when it comes to seeding it fails:
php artisan migrate:refresh --seed Rolling back: 2014_07_02_230147_migration_cartalyst_sentinel Rolled back: 2014_07_02_230147_migration_cartalyst_sentinel Migrating: 2014_07_02_230147_migration_cartalyst_sentinel Migrated: 2014_07_02_230147_migration_cartalyst_sentinel
[ErrorException] include(C:\Users\nathaniel\Desktop\LaraProjects\cms\vendor\composer/../../atabase/seeds/DatabaseSeeder.php): failed to o pen stream: No such file or directory
I've tried dumping autoload and clearing cache but the problem is still here. Thanks
Upvotes: 0
Views: 1868
Reputation: 11340
First try to upgrade composer: composer self-update
I don't know the reason of this weird bug, but you can fix it by providing full path to database in composer.json
(worked for buggy composer version 1.4.2)
"classmap": [
"C:\\Users\\nathaniel\\Desktop\\LaraProjects\\cms\\database"
],
Upvotes: 1
Reputation: 68
Cant add comment, anyway, try check folder, what name is exactly database
, next open composer.json
and check this params
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
After try again composer dump-autoload
and check.
Upvotes: 1