11

I am trying to run command

composer update 

getting this error message:

[RuntimeException] Could not scan for classes inside "database" which does not appear to be a file nor a folder

This is the code inside my composer.json:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.2.*",
    "jenssegers/mongodb": "^2.0",

"lucadegasperi/oauth2-server-laravel": "^5.1",

"laravelcollective/html": "5.2.*",

"davibennun/laravel-push-notification": "dev-laravel5"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "symfony/css-selector": "2.8.*|3.0.*",
    "symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist"
}

}
3
  • 1
    Please make sure that the database folder exists in the project root. Commented Apr 26, 2016 at 10:07
  • yeah thanks Praveesh. Commented Apr 26, 2016 at 18:05
  • I got the same error when I accidentally dragged the database directory into another directory without realising that I'd done it. Commented Aug 19, 2016 at 12:11

1 Answer 1

10

We can resolve this issue by create database folder under our project root: <PROJECT_ROOT>/database. If we want to make sure all things are good to use, we can delete composer.lock file and run the composer update command again.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.