phplaravel-5envoyer.io

Laravel / Envoyer production error - Class view does not exist


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.


Solution

  • After quite a bit of experimentation with no luck, I think I resolved it. The Ubuntu user that was set up for deployment with Envoyer was, by default, deploying everything with the 'envoyer' group permissions. This created a permissions conflict with the actual app permissions on Ubuntu. I updated the default group for the deploying user to 'www-data' and it seems that everything is cleared up now.