Laravel / Envoyer production error - Class view does not exist

时间:2017-08-04 13:02:52

标签: php laravel-5 envoyer.io

I recently created a new production deployment for a new Laravel-based system. Initially, I had a few permissions issues with the storage folder that I resolved pretty easily. Once I resolved those, I had the app running correctly, but upon my next deployment (with Envoyer), I ran into a different issue that I haven't been able to pin down.

I'm now getting a fatal PHP error that I wasn't getting before:

PHP Fatal error: Uncaught ReflectionException: Class view does not exist in /var/www/Core/releases/20170804125010/vendor/laravel/framework/src/Illuminate/Container/Container.php:719\nStack trace:\n#0 /var/www/Core/releases/20170804125010/vendor/laravel/framework/src/Illuminate/Container/Container.php(719): ReflectionClass->__construct('view')\n#1 /var/www/Core/releases/20170804125010/vendor/laravel/framework/src/Illuminate/Container/Container.php(598): Illuminate\Container\Container->build('view')\n#2 /var/www/Core/releases/20170804125010/vendor/laravel/framework/src/Illuminate/Container/Container.php(567): Illuminate\Container\Container->resolve('view')\n#3 /var/www/Core/releases/20170804125010/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(708): Illuminate\Container\Container->make('view')\n#4 /var/www/Core/releases/20170804125010/vendor/laravel/framework/src/Illuminate/Container/Container.php(1139): Illuminate\Foundation\Application->make('view')\n#5 /var/www/Core/releases/20170804125010/vendor/laravel/framewo in /var/www/Core/releases/20170804125010/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 719

I've played around with various permissions, tried manually running composer install/update, npm install/etc. with no resolution. Any thoughts would be greatly appreciated.

1 个答案:

答案 0 :(得分:3)

经过相当多的实验,没有运气,我想我已经解决了。默认情况下,设置为与Envoyer一起部署的Ubuntu用户使用“envoyer”组权限部署所有内容。这与Ubuntu上的实际应用程序权限创建了权限冲突。我将部署用户的默认组更新为“www-data”,似乎现在一切都已清除。