laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.51k stars 11.02k forks source link

every artisan command gives me a "[RuntimeException] Directory name must not be empty." #21451

Closed mubassirhayat closed 7 years ago

mubassirhayat commented 7 years ago

Description:

I updated my dependencies yesterday and since then I have been getting

[RuntimeException]
  Directory name must not be empty.

on my local dev system

What is more concerning is that I am getting a totally different type of error on my testing server here is the output that I get whenever I run an artisan command on the server

Fatal error: Uncaught exception 'UnexpectedValueException' with message 'There is no existing directory at "/storage/logs" and its not buildable: Permission denied' in /home/techeasesol/public_html/staging/whereyou/WhereYou/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:171
Stack trace:
#0 /home/techeasesol/public_html/staging/whereyou/WhereYou/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(97): Monolog\Handler\StreamHandler->createDir()
#1 /home/techeasesol/public_html/staging/whereyou/WhereYou/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array)
#2 /home/techeasesol/public_html/staging/whereyou/WhereYou/vendor/monolog/monolog/src/Monolog/Logger.php(337): Monolog\Handler\AbstractProcessingHandler->handle(Array)
#3 /home/techeasesol/public_html/staging/whereyou/WhereYou/vendor/monolog/monolog/src/Monolog/Logger.php(616): Monolog\Logger->addRecord(400, Object(InvalidArgumentException), Array)
#4 /home/techeasesol/public_html/st in /home/techeasesol/public_html/staging/whereyou/WhereYou/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 171

here is my composer.json file

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "atayahmet/laravel-nestable": "^0.8.1",
        "davibennun/laravel-push-notification": "dev-laravel5",
        "doctrine/dbal": "v2.5.13",
        "laravel/framework": "5.4.*",
        "laravel/tinker": "~1.0",
        "laravelcollective/html": "^5.4.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "barryvdh/laravel-ide-helper": "^2.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.7"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "ConnectABoss\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

Steps To Reproduce:

There are no steps, the artisan command line tool gives me errors on each and every command

PS Thanks for all the work you have done for the community.

jmarcher commented 7 years ago

Have you tried to do what the error says? Create a "logs" folder inside storage

mubassirhayat commented 7 years ago

yes I have created the logs folder and the laravel.log file as well

mubassirhayat commented 7 years ago

the owner of the file is apache user and the write access is 755

themsaid commented 7 years ago

Please ask on the forums, this repo is for bug reporting only. You can use https://laracasts.com/discuss or https://laravel.io/forum which are forums with a very large community of developers helping each other.