-
Notifications
You must be signed in to change notification settings - Fork 15
setup:di:compile error using manual install of AvaTax module #2
Comments
I never ran into this issue when testing. If anyone else is able to reproduce this issue, I'll take another look and try to reproduce it. |
@inspiredchu Do you get this issue if you run the compiler in multi tenant mode? |
I didn't test it compiling in multi tenant mode, but I believe that the source of the error comes from the ClassyLlama_AvaTax/registration.php file. In it, you register both modules... ClassyLlama_AvaTax and avalara/avatax:
I believe the problem occurs when the modules are in different module folders (app/code vs vendor). If the user installs both modules using composer, then both will be in the /vendor folder. I believe the issue will only pop up if the user uses composer to install one module and then manually installs another module in the app/code folder. |
@inspiredchu Oh, that makes sense. I'll add this to our backlog to fix. Thanks for reporting. |
@erikhansen Not sure why do you need to add Avalara_AvaTax to registration.php? I think it is autoloaded by PSR-4 already (same way as monolog or braintree) |
@hiephm Good point. I'll test to see if I can remove that next time I work on this extension. |
The file should simply look like this… <?php
use \Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'ClassyLlama_AvaTax', __DIR__); It's kind a the point of using the magic constant ;) |
@davidalger That is what the file usually looks like, but it is perfectly fine to register more than one module in a However, I would say there is an issue with the current avatax |
With the latest version 1.2.0, I still have an issue when I try to do bin/magento setup:di:compile When I tried to manually create avalara/avatax directory under vendor, it passes that state and give different exception:
I am running in developer mode and PHP 7.0.22 Because of this failure, when I tried to go to checkout/cart page, I got an error |
When this line as per your documentation:
composer require avalara/avatax:14.4.4
it installs the avalara/avatax module in the magneto/vendor folder. When you run:
php bin/magento setup:di:compile, you get the following error:
[Magento\Framework\Exception\FileSystemException]
Invalid path: /var/www/html/magento/app/code/ClassyLlama/AvaTax/../../avalara/avatax
I solved this by moving the files from the magento/vendor folder to the magento/app/code folder.
Hope this helps someone in the future.
The text was updated successfully, but these errors were encountered: