3

I am using Yireo_Webp2 module. The issue is I have downloaded it from git and then activated it. it also have some dependencies so I have run composer update in app/code/Yireo/Webp2 folder which created a vendor folder in app/code/Yireo/Webp2.

Now these library are using autoload.php and it is included as require 'vendor/autoload.php'; which referring magento's autoload. so my module's libraries are not getting called. It always displaying this class is not found etc. so how can I autoload these lib files? or should I shift them to magento's vendor folder.

2 Answers 2

4

Composer Install (Recommended)

You don't need to do this much of steps, Only you have to do this following steps are:

Install Extension with command line:

composer require yireo/magento2-webp2

Automatically all required modules or files or lib are download with composer.

Then only you have to run Basic Magento Commands:

bin/magento module:enable Yireo_Webp2
bin/magento cache:clean
bin/magento setup:upgrade

And if you are Installing Manually

You need to download the Folder Zip then Create the Path in your root project as:

Path: app/code/Yireo/Webp2

Then Paste you zip and Extract then paste your whole code from webp2 to Folder Webp2.

Now Run Basic Commands Such as:

bin/magento module:enable Yireo_Webp2
bin/magento cache:clean
bin/magento setup:upgrade

Remove your existing code and Please Follow this steps either Composer way or Manually Installation.

3
  • 1
    I have done manual installation but its not working as in manual installation lib files are not included. I guess composer way will be better.
    – Stack user
    Commented Sep 18, 2019 at 8:07
  • Yes, Always Prefer composer. Commented Sep 18, 2019 at 8:14
  • I have installed it manually and at frontend it shows: Uncaught Error: Class 'Laminas\Uri\Uri' not found in app/code/Yireo/Webp2/Image/File.php on line 54. so what to do in this case? Commented Jul 25, 2020 at 5:33
0

One more workaround I have found for current scenario is that I have deleted that vendor folder of app/code/Yireo/Webp2. Then copied the libs in require section of magento's composer.json and run composer update.

3
  • okay, is there any issue you found on this? Commented Sep 18, 2019 at 10:09
  • no it also worked. it is for that modules which has their composer.json and we have manually installed them.
    – Stack user
    Commented Sep 18, 2019 at 11:10
  • Okay. That's Great Commented Sep 18, 2019 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.