У меня возникли проблемы после развертывания приложения Laravel на Heroku.Локально работает нормально, тем не менее проблема возникает после развертывания.
Я получаю эту ошибку при каждой попытке подключения к производственному приложению.
at StreamHandler->write(array('message' => 'There is no existing directory at "/home/vagrant/Webs/eco/storage/logs" and its not buildable: Read-only file system', 'context' => array('exception' => object(UnexpectedValueException)), 'level' => 400, 'level_name' => 'ERROR', 'channel' => 'local', 'datetime' => object(DateTime), 'extra' => array(), 'formatted' => '[2019-03-11 03:12:36] local.ERROR: There is no existing directory at "/home/vagrant/Webs/eco/storage/logs" and its not buildable: Read-only file system {"exception":"[object] (UnexpectedValueException(code: 0): There is no existing directory at \\"/home/vagrant/Webs/eco/storage/logs\\" and its not buildable: Read-only file system at /app/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:171)[stacktrace]
#0 /app/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(97): Monolog\\\\Handler\\\\StreamHandler->createDir()
#1 /app/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(119): Monolog\\\\Handler\\\\StreamHandler->write(Array)
Мой файл composer.json выглядит следующим образом:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"dingo/api": "2.0.0-alpha2",
"fideloper/proxy": "^4.0",
"fzaninotto/faker": "^1.8",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"league/flysystem-aws-s3-v3": "^1.0",
"maatwebsite/excel": "^3.1",
"tymon/jwt-auth": "1.0.0-rc.3",
"zizaco/entrust": "dev-master"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Что странно для меня, так это то, что Laravel ищет локальный файл журнала в производственной среде.
Любая помощь приветствуется.Благодарю.