cancel
Showing results for 
Search instead for 
Did you mean: 

Class does not exist

Class does not exist

Hello everyone, I'm getting this error during compile.

This module (dakzilla) is in my vendor folder...

- Cache is disable
- Permissions should be ok

Any idea?

 

Class "dakzilla\intervention\image\helper\Helper\Image" does not exist
  Class Acme\Theme\Block\Catalog\Categories\Interceptor generation error: The requested class did not generate properly, because the '
  generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generat
  ed' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class o
  bject to the signature of the related construct method, only.
2 REPLIES 2

Re: Class does not exist

Hi.

I think autoload may have some issues.

- Remove dakzilla and reinstall

- Or you can try running

composer dump-autoload


Or the Acme\Theme\Block\Catalog\Categories class might not be correctly referenced.
- Try changing to dakzilla\intervention\image to Dakzilla\Intervention\Image or something similar, as defined in composer.json of dakzilla

"autoload": {
        "psr-4": {
            "Webmozart\\Assert\\": "src/"
        }
    }



 

Mageplaza | Top-Rated Magento Extension and Solution Provider


Should you have any questions or concerns, feel free to contact us via consultant@mageplaza.com

Re: Class does not exist

Hello @picardalai7c92,

 

This Magento 2 cannot find the class dakzilla\intervention\image\helper\Helper\Image during dependency injection (DI) compilation.

Check The class dakzilla\intervention\image\helper\Helper\Image exist or not  in the module.

if the file not exist in module then remove that file usage from module or anywhere else or just reinstall the module to correctly get all the required .

Also remove generated file that can cause this issues:

 

rm -rf var/cache/* var/page_cache/* var/generation/* generated/*



bin/magento setup:di:compile

If the issue is resolved, click Kudos and accept it as a solution.