PHP Fatal error: Class 'Drupal\Core\DrupalKernel' not found I have installed the EntityPrint module in drupal 8 for the pdf conversion.

Followed below procedure:


  curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer composer config repositories.drupal composer https://packages.drupal.org/8
  
  Run: composer require "drupal/entity_print 2.x" in the site docroot/.



https://packagist.org/packages/mikehaertl/phpwkhtmltopdf
https://packagist.org/packages/dompdf/dompdf
https://packagist.org/packages/tecnickcom/tcpdf


I have installed the above packages using, as the entity print module insisted to install it in drupal page.

Once the installation was done, drupal site was crashed, while checking the error log, I got the following:




  [error] FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'Drupal\Core\DrupalKernel' not found in /var/www/html/drupal/index.php on line 16" while reading response header from upstream


I have uninstalled the packages but unable to disable entity print. Since my drush command results in error.

Can anyone please help me to find out?
Try the following:


Check if autoload.php file exists and it includes the right path to your vendor/ folder. 
Clear any external cache services if in use (e.g. Memcached or Redis).
If you're using PHP 5.x, you should use PHP 7.x instead.




To rebuild your site from scratch based on your composer.json file, try the following steps:


Backup and delete the /core and /vendor directories completely.
Delete the composer.lock file.
Run: composer install.
Run: composer update.


Source: D8 conflict resolution.