Questions tagged [setup-di-compile]

Denotes questions related to the setup:di-compile command of Magento 2. This command is used to compile the setup.

Filter by
Sorted by
Tagged with
1 vote
2 answers
33 views

Error while running bin/magento setup:di:compile - Magento 2.3.4

this is driving me insane. I am receiving the following error while running compile: Fatal error: Cannot declare class Magento\Sales\Model\Order\Pdf\Invoice, because the name is already in use in /...
zoedanbus's user avatar
1 vote
1 answer
66 views

Magento 2.4.6: Getting error "Namespace not defined properly" when compile command running

When I am trying to compile, then I am getting Below error: Namespace not defined properly you can see proper command running here : www-data@robert-php-fpm:/var/www/html$ bin/magento setup:di:...
Amit Dwivedi's user avatar
  • 1,540
1 vote
2 answers
48 views

How and when should I use the Magento 2 commands bin/magento setup:upgrade, bin/magento setup:di:compile, and bin/magento static:content:deploy -f?

I'm new to Magento 2 and I'm trying to understand the purpose and appropriate usage of some important commands. Specifically, I would like to know more about the following commands: bin/magento setup:...
user avatar
0 votes
1 answer
151 views

Error durin compilation Magento 2.4.6

Repositories code generation... 1/9 [===>------------------------] 11% 1 sec 76.0 MiB There is an error in vendor/magento/module-page-builder/Model/Dom/CharacterData.php at line: 15 Interface &...
Robinio's user avatar
  • 771
0 votes
1 answer
487 views

Undefined array key "instance" in ArgumentsResolver.php on line 171 after upgrading to 2.4.6

After doing an update from 2.4.2 to 2.4.6 I am getting that error on compilation in compilation step 5 rfunning PHP 8.1. I searched a bit and found setup:di:compile fails after update to magento 2.4.4....
user4095519's user avatar
1 vote
2 answers
144 views

Upgrading magento 2.3.6 to 2.4.5 its running in php8.1

Already run the setup:upgrade command it's working fine, but now when I am running the setup:di:compile command, it's giving the below error message. Repositories code generation... 1/9 [===>------...
none's user avatar
  • 11
0 votes
1 answer
663 views

compiling error magento 2

I am using Magento 2.4.5 and php 8.1 when I try to sudo php bin/magento setup:di:compile I get this error: Compilation was started. Repositories code generation... 1/9 [===>------------------------...
Henri's user avatar
  • 113
0 votes
0 answers
251 views

Class Zend\Console\Response does not exist After Magento 2 upgrade

After upgrade from Magento 2.4.2 to 2.4.4, and run bin/magento setup:di:compile I got this error Class Zend\Console\Response does not exist This is my composer.json file { "name": "...
tarek fellah's user avatar
0 votes
1 answer
830 views

Running php bin/magento setup:upgrade caused magento 2 app to crash

I originally was facing an issue of not being able to save any configurations on my magento application, and a user on this site recommended to run the php bin/magento setup:upgrade command as the ...
Slippy's user avatar
  • 1
1 vote
1 answer
2k views

Magento upgrade error 2.4.5 in php 8.1

I am facing after an issue after upgrading version magneto 2.4.3 to 2.4.5 When I run this command I got error php bin/magento setup:di:compile Deprecated Functionality: Return type of Zend_Config::...
kiran's user avatar
  • 547
1 vote
3 answers
161 views

Magento 2: Errors on running setup:di:compile after upgrade from Magento version 2.4.3 to 2.4.5:

I am getting this error after upgrading Magento version 2.4.3 to 2.4.5 I am unable to find any solution. please help.
kiran's user avatar
  • 547
1 vote
0 answers
90 views

Incompatible argument type: Required type: \Magento\Framework\EntityManager\MetadataPool. Actual type: string; when trying to override resource model

I am trying to override the Resource model for the cms page file in the sitemap module my code is <?php namespace MyModule\SiteMap\Model\ResourceModel\Cms; use Magento\Cms\Api\Data\PageInterface; ...
nickcobb's user avatar
2 votes
1 answer
796 views

How Can I resolve Amasty\Base compatible with Monolog\Formatter\LineFormatter::format(array $record) In MAgento 2?

I upgrade Magento 2.4.3 to 2.4.5 and here I get this error at compilation time so how can I resolve this error? I try to compile and indexer.
Jay Parmar's user avatar
0 votes
0 answers
62 views

Magento 2 - Extension throws error during compilation, even though it is disabled

I try to compile my project with bin/magento setup:di:compile, but I get: Company\PdfDesign\Block\Order Incompatible argument type: Required type: \Magento\Payment\Helper\Data. Actual ...
Black's user avatar
  • 3,150
0 votes
1 answer
62 views

How can i overwrite file from vendor so that setup:di:compile won't read it

I have a 3rd party module that is giving some deprecation issues. Is there any way to replace the class that is having problems in my own module in app/code without moving the whole module from vendor?...
user2239352's user avatar
0 votes
1 answer
36 views

Error on compilation: Incompatible argument type: Required type: \Aheadworks\Blog\Api\CategoryManagementInterface. Actual type: array; File:

I'm new to Magento and working on upgrading an existing project to 2.4.3. When running php -dmemory_limit=5G bin/magento setup:di:compile I'm encountering an error: Incompatible argument type: ...
Sara Fuerst's user avatar
2 votes
6 answers
1k views

setup:di:compile fails after updating to 2.4.4

I upgraded from 2.4.2 to 2.4.4. Everything seemed to work, until I ran setup:di:compile. I get this error: MiBClass 'Zend\I18n\Validator\PhoneNumber' not found#0 /var/www/html/magento2/vendor/...
Adamf's user avatar
  • 43
1 vote
2 answers
1k views

Magento 2.4.4 (PHP 8.1) Error while running setup:di:compile

Compilation was started. Repositories code generation... 1/9 [===>------------------------] 11% < 1 sec 77.0 MiBClass "Rsg\Enquiry\Controller\Index\Magento\Framework\View\Element\Template&...
rohit's user avatar
  • 11
1 vote
2 answers
1k views

Magento 2 setup:di compile error In ErrorHandler.php line 61:

Warning: file_put_contents(root/generated/metadata/primary|global|plugin-list.php): failed to open s tream: No such file or directory in D:\xampp\htdocs\wp7\vendor\magento\framework\Interception\...
Salek Uddin Sheikh's user avatar
3 votes
4 answers
4k views

Magento 2.4.4 - issue with setup:di:compile

I recently upgraded my site to Magento 2.4.4 with PHP 8.1 and noticed that when I try to run the command '$ php bin / magento setup: di: compile' the process stops at 1/9 with this error message : 1/...
Jackom's user avatar
  • 441
0 votes
1 answer
231 views

"magento/module-new-relic-reporting" not installed after upgrade

So, I did a lot of research and tried a lot of ideas to solve this but without luck. That's why I'm asking. I'm trying to upgrade magento from 2.3.3 to 2.4.4 . I stacked on a problem that "...
Shack Ro's user avatar
0 votes
1 answer
232 views

DB access during "bin/magento setup:di:compile"

I have a project in which DB access is happening during the DI compilation process. My understanding is that there should be no DB access while running bin/magento setup:di:compile. When I test this ...
Joe Shelton's user avatar
0 votes
1 answer
35 views

Compilation error Magento 2.4.3

what kind of compilation error is this? Can I share with you other info? I have Magento 2.4.3 https://ibb.co/sVFd0Nq
user3718303's user avatar
0 votes
2 answers
214 views

Install Inventory Manager in 2.4.3 version

I'm trying to install Inventory Manager in my Magento 2.4.3 version after Magento installation. For doing this I download the entire project from here https://github.com/magento/inventory and upload ...
user3718303's user avatar
0 votes
3 answers
862 views

Magento 2.4.3p1: Compilation error

I am getting this error on compile: Repositories code generation... 1/9 [===>------------------------] 11% < 1 sec 127.0 MiBsyntax error, unexpected 'parent' (T_STRING)#0 /home/737025....
mechanic's user avatar
  • 360
0 votes
1 answer
95 views

Magento: Upgrade modules, Compile code, Deploy static content, Flush cache

I am running this gist after changing anything in module code. I need feedback for improving this gist & Magento 2 development. https://gist.github.com/enishant/211212beeadff49aba00c0622a0f33ab #!/...
Nishant's user avatar
  • 101
0 votes
1 answer
186 views

Compilation error in magento 2.4

Class Webkul\Marketplace\Helper\Data does not exist Class Webkul\MobikulMp\Controller\Seller\RewriteUrlPost\Interceptor generation error: The requested class did not generate properly, because the '...
soofz's user avatar
  • 360
0 votes
1 answer
2k views

Class ... does not exist In classReader.php line 34 in magento2

Just got a problem while compiling: Compilation was started. Area configuration aggregation... 5/9 [=======>-----] 55% 1 min 326.0 MiB In ClassReader.php line 45: Impossible to process constructor ...
Filip Sroka's user avatar
0 votes
1 answer
1k views

magento2.4.1 setup:di compile error

I got a small problem when compiling magento,i.e, C:\xampp\htdocs\magento-ce-2.4.1-2020-09-25-04-08-02>php -dmemory_limit=4G bin/magento setup:di:compile Compilation was started. Plugin list ...
Rakshith Rai's user avatar
5 votes
1 answer
9k views

Magento 2 - The requested class did not generate properly, because the 'generated' directory permission is read-only

I got this issue after running bin/magento setup:di:compile $ bin/magento setup:di:compile Compilation was started. Interceptors generation... 4/9 [============>---------------] 44% 16 secs 300.0 ...
D Major's user avatar
  • 51
0 votes
2 answers
131 views

php -dmemory_limit=-1 bin/magento setup:di:compile

I am trying to install our live website into the localhost But I have encountered this error while running command php -dmemory_limit=-1 bin/magento setup:di:compile Parse error: syntax error, ...
user99886's user avatar
0 votes
2 answers
179 views

Magento 2: Custom module error Class OAuth\Common\Storage\Session does not exist

I have using Magento 2.4.2 enterprise edition and install custom module after run command php bin/magento setup:upgrade and then run command php bin/magento setup:di:compile but facing error while run ...
Kirti Nariya's user avatar
  • 3,421
0 votes
1 answer
1k views

Laminas compile error at update to 2.4.3

I was updating Magento Community from 2.4.2 to 2.4.3 and get this error at compile on 55%: Deprecated Functionality: Class Laminas\Hydrator\Reflection is deprecated, please use Laminas\Hydrator\...
Alisinasyon's user avatar
0 votes
3 answers
322 views

Error during compilation after upgrade from 2.4.1 to 2.4.2

I have below error while running php bin/magento setup:di:compile Compilation was started. Repositories code generation... 1/9 [==>----------------] 11% < 1 sec 105.0 MiB Interception cache ...
kiran's user avatar
  • 547
1 vote
0 answers
182 views

Class Magento\Framework\Mview\TriggerCleaner does not exist on running setup:upgrade error occurs on Magento 2

On running setup:upgrade error occurs and setup upgrade not started Class Magento\Framework\Mview\TriggerCleaner does not exist on di:compile this error occur In ClassReader.php line 43: ...
Prits's user avatar
  • 626
0 votes
0 answers
50 views

Allow backorder per website

We created a module to allow backorder per store view rather than default. This module works in Magento 2.3.3 but I tried to implement this to a Magneto 2.3.6 installation also. However, I get this ...
Jan-petter Havna's user avatar
0 votes
1 answer
997 views

Getting Error on di:compile in Magento 2.4.2

I have installed Magento 2.4.2 and then installed Claue Theme after setup theme and running command php bin/magento setup:di:compile it will working on 5 from 9 then give an error like Compilation ...
Prits's user avatar
  • 626
1 vote
1 answer
328 views

Incompatible argument type: Required type: string. Actual type: \Magento\Store\Model\StoreManagerInterface;

I have setup a website on local. Magento version is 2.2.4 and php version is 7.0.33 Frontend is working but admin is not working after upgrade and deploy the code. But getting error during compilation:...
Vinod Kumar's user avatar
  • 2,045
0 votes
2 answers
779 views

Magento 2 - preference override not working for method sendConfirmationRequestEmail of module-newsletter

I try to override the method sendConfirmationRequestEmail from the module-newsletter Module in vendor\magento\module-newsletter\Model\Subscriber.php. Attempt: app\code\Company\Newsletter2Go\etc\di.xml ...
Black's user avatar
  • 3,150
1 vote
2 answers
1k views

Error during compilation in magento2 .3 Incompatible argument type: Required type:

Webkul\Marketplace\Model\Order\Pdf\Creditmemo Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File: /var/www/...
Sonali Ghule's user avatar
0 votes
1 answer
520 views

ReflectionException Class Mirasvit\Core\Model\ModuleFactory does not exist, when running setup:di:compile or setup:upgrade

I received the following error when I run the command php bin/magento setup:di:compile Error [ReflectionException] Class Mirasvit\Core\Model\ModuleFactory does not exist The extension provider ...
Mage Explorer's user avatar
0 votes
0 answers
101 views

Error When Running setup:di:compile

I am trying to do compilation of Magento 2.2.2 installation and I am getting errors as shown below. Kindly assist in how to resolve it. Thanks in advance. [root@www html]# bin/magento setup:di:compile ...
manunnko's user avatar
1 vote
1 answer
1k views

Magento 2 error : Incompatible argument type: Required type: \Magento\Framework\Registry. Actual type: array; File:

Code use Magento\CustomerBalance\Helper\Data; use Magento\Framework\App\ObjectManager; use Magento\Framework\Registry; use Magento\Framework\View\Element\Template; use Magento\Framework\View\Element\...
php dev's user avatar
  • 15
0 votes
4 answers
495 views

Compile issue: Class AreProductsSalableInterface does not exist

Having issue in setup:di:compile and give below issue Already checked: Magento 2 Setup di Compile Problem Magento Vesion: 2.3.1 Update 1: If i try with command bin/magento setup:di:compile -vvv, it ...
Jarnail S's user avatar
  • 4,687
0 votes
0 answers
178 views

Am running the command setup:di:compile, I get this error:

php bin/magento setup:di:compile Compilation was started. Area configuration aggregation... 5/8 [========>-----] 62% 34 secs 348.0 MiB In ClassReader.php line 43: Class Magento\Catalog\Model\...
Rajesh Stanley's user avatar
0 votes
0 answers
35 views

Deactivating and reactivating plugins on-the-fly

I am currently developing on a VM with a Ubuntu host machine - it is super slow. I am currently trying to implement a plugin but the magento s:d:c command takes 6 minutes. Within examples for Plugins ...
Scott Anderson's user avatar
1 vote
1 answer
3k views

Magento 2 di:compile error - Directory not empty

How to solve the following error, The directory "C:/xampp/htdocs/mage/generated/code/Magento/Framework" cannot be deleted Warning!rmdir(C:/xampp/htdocs/mage/generated/code/Magento/Framework):...
zus's user avatar
  • 155
0 votes
0 answers
60 views

Magento 2.3 Compilation Command Break without any error, how can track the actual error?

When run compile command break automatically, no error found in log file, how can i track the actual error?
soroj jana's user avatar
0 votes
1 answer
2k views

bin/magento setup:di:compile getting 'generated' directory permission is read-only' error

During run bin/magento setup:di:compile getting following error, i gave 777 permission to generated folder still getting error. How to solve the following error, Class Magento\Inventory\Model\Source ...
zus's user avatar
  • 155
0 votes
1 answer
698 views

Magento 2.4 is this possible bypass Elasticsearch?

i have upgraded magento 2.3.4 to 2.4.0 but when I run compile command, it's showing an error Error: Compilation was started. Area configuration aggregation... 5/8 [=================>----------] ...
Rakesh Donga's user avatar
  • 5,324