CentOS Laravel项目报错

新的项目在centos端git pull下来利用composer install 和 update 后运行会报错,请问是啥问题?

Fatal error: Uncaught ReflectionException: Class config does not exist in /home/www/station/vendor/laravel/framework/src/Illuminate/Container/Container.php:767 Stack trace: #0 /home/www/station/vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('config') #1 /home/www/station/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('config') #2 /home/www/station/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('config', Array) #3 /home/www/station/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(734): Illuminate\Container\Container->make('config', Array) #4 /home/www/station/vendor/laravel/framework/src/Illuminate/Container/Container.php(1210): Illuminate\Foundation\Application->make('config') #5 /home/www/station/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(443): Illuminate\Container\Container->offsetGet('config') #6 /home/www/statio in /home/www/station/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 767

有人说是.env里面有空格,可是我检查了,并没有空格

海绵宝宝撒
浏览 494回答 3
3回答

弑天下

一般push上去的.env文件是git被忽略的,需要在服务器网站根目录检查下有没有.env,还有就是有些安装包需要重新发布生成config文件

红糖糍粑

尝试把 bootstrap/cache 删除后重新 composer update 一下。
打开App,查看更多内容
随时随地看视频慕课网APP