runoops.com

laravel 安装报错 Please provide a valid cache path

laravel8 composer install 安装报错:

Please provide a valid cache path.
xxx
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

这是因为laravel的缓存路径没有找到

laravel缓存文件路径是在 config/cache.php中设置,默认存在storage文件夹中:

'file' => [
        'driver' => 'file',
        'path' => storage_path('framework/cache/data'),
 ],

解决办法:

需要保证storage/framework下面创建 sessions, views, cache 文件夹并确保可写权限,再次执行:

composer install

Captcha Code

0 笔记

分享笔记

Inline Feedbacks
View all notes