cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 setup

Magento 2 setup

I have downloaded magento 2 and trying to install it on localhost but getting the following error

Fatal error: Uncaught ReflectionException: Class Magento\Framework\App\ResourceConnection\Proxy does not exist in /var/www/html/m2/lib/internal/Magento/Framework/Code/Reader/ClassReader.php:26 Stack trace: #0 /var/www/html/m2/lib/internal/Magento/Framework/Code/Reader/ClassReader.php(26): ReflectionClass->__construct('Magento\\Framewo...') #1 /var/www/html/m2/lib/internal/Magento/Framework/ObjectManager/Definition/Runtime.php(54): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...') #2 /var/www/html/m2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo...') #3 /var/www/html/m2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #4 /var/www/html/m2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(167): Magento\Framework\ObjectManager\ObjectManager->get('Mage in /var/www/html/m2/lib/internal/Magento/Framework/Code/Reader/ClassReader.php on line 26

Thanks in advance.

6 REPLIES 6

Re: Magento 2 setup

@tarun_abc run the below commands.

 

sudo rm -rf var/cache/* generated/*
sudo chmod -R 777 var/ pub/static/ generated
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
sudo chmod -R 777 var/ pub/static/ generated/

Then check and let me know.

 

Thanks

Re: Magento 2 setup

Have you solved it? I am getting the same error. If you, Please let me know.

Re: Magento 2 setup

Have you solved the problem? I'm getting the same error too.

Re: Magento 2 setup

@paulosilva3a7b have you run the commands which i have mention above?

Re: Magento 2 setup

To resolve the "Class does not exist" error during Magento 2 installation, follow these steps:

  1. Check file permissions.
  2. Clear the cache by deleting the contents of the var/cache directory.
  3. Generate code using the commands:
    php bin/magento setup:di:compile php bin/magento setup:static-content: deploy -f
  4. Verify the PHP version and enabled extensions.
  5. Ensure your system meets Magento requirements.
  6. Reinstall dependencies with composer install.

These steps should help you overcome the error and successfully install Magento 2 on your localhost.

Re: Magento 2 setup

Setting up Magento 2 for your e-commerce platform is akin to organizing a hospital's information system, where attention to detail and systematic steps are crucial. Here are the key points in a sequential manner:

  1. System Requirements: Ensure your server meets Magento 2's system requirements, similar to how hospitals verify equipment compatibility.
  2. Installation: Download and install Magento 2, either via composer or by directly downloading from the Magento website.
  3. Database Setup: Create a database for Magento 2, just as hospitals set up databases for patient records.
  4. Web Server Configuration: Configure your web server - Apache or Nginx - for optimal performance, in the same way that hospitals configure their systems for efficiency.
  5. Magento Installation: Run the Magento setup wizard or use command-line installation, ensuring all components are correctly configured.
  6. SSL Configuration: Secure your site with SSL, much like how hospitals secure patient data.
  7. Theme and Extensions: Install a theme and any necessary extensions, customizing Magento to fit your specific needs.
  8. Payment and Shipping Methods: Set up payment and shipping methods, ensuring a smooth transaction process.
  9. Testing: Test your site thoroughly to ensure everything works correctly, akin to how hospitals conduct equipment tests.
  10. Maintenance and Updates: Regularly maintain and update your Magento site for security and performance, similar to how hospitals regularly update their systems and protocols.

Each step is vital for a successful Magento 2 setup, ensuring a robust and efficient e-commerce platform, much like the meticulous systems in place in hospital settings.