Dependencies of Third Party Libraries In Magento 2
-
28-12-2020 - |
Pregunta
Recently I installed Mpdf
library using composer in my Magento 2.1.7 local setup, and It is working perfect on localhost. Now I have to move those libraries to live server (I can not install there through composer as I don't have permission.) for that I have moved mpdf
directory from magentoRoot/vendor/mpdf
at same path on live, but it is not working on live server and throwing below error
Uncaught Error: Class 'Mpdf\Mpdf' not found
After moving files I have ran setup:upgrade
and content:deploy
commands.
What I am missing here? Is there any other changes needed along with moving the library files?
Solución
Did you check vendor/composer/autoload_psr4.php? Magento 2 need to recognize your library through autoload.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange