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
2answers
27 views

Any Drawback on running setup:upgrade, di:compile, static deploy everytime code level edit on Magento 2

Is it ok to run the following set of commands by default everytime I make a code level edit (layout edits, module creation, extension update) php bin/magento setup:upgrade php bin/magento setup:di:...
15
votes
5answers
3k views

Magento 2.3.3 Fails on magento setup:di:compile with an error mentioning InvoiceFlexFieldProcessorInterface

I have installed the new Magento 2.3.3 version. After I have run the command: php bin/magento setup:di:compile I have Faced the following error: PHP Fatal error: Interface 'Vertex\Tax\Model\...
3
votes
2answers
161 views

DI compile step fails after update to 2.3.5

Using Magento Cloud, the DI compile step keeps failing after upgrading from 2.3.3 to 2.3.5 via composer and pushing the changes up. The error is the same every time I've tried, which is: PHP Fatal ...
2
votes
1answer
168 views

Magento Multi-tenant compliation

What exactly is a multi-tenant compiler in Magento as referred in this link: http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html?
0
votes
1answer
50 views

Magento 2.3 Warning: Declaration of MGS\Amp\Block\Html\Topmenu

I am getting this error: Warning: Declaration of MGS\Amp\Block\Html\Topmenu::_getHtml(Magento\Framework\Data\Tree\Node $menuTree, $childrenWrapClass, $limit, array $colBrakes = Array) should be ...
0
votes
2answers
17 views

Magento 2 - Incompatible argument type, even though constructor parent call matches extended class

I try to extend this class from my own module, because I need to inject another dependency to the constructor and add a few new methods: vendor\aheadworks\module-wbtab\Block\Wbtab\ProductList.php ...
0
votes
1answer
120 views

Magento 2.3.5 Incompatible argument type errors during compilation

I'm trying to compile after upgrade to magento 2.3.5-p1 and I get this error: public_html$ php bin/magento setup:di:compile The directory "/public_html/generated/code/Magento" cannot be deleted ...
0
votes
0answers
24 views

magento 2.2.1 Cannot declare class Hybrid_Autoload, because the name is already in use

i have porto theme allready installed when i am installation new theme after run upgrade or compile command then below type error showing Cannot declare class Hybrid_Autoload, because the name is ...
6
votes
1answer
6k views

Notice: unserialize(); Error at offset in Magento 2.2

This code not working in Magento 2.2, But it's working in Magento 2.1. I am facing this error Notice: unserialize(); Error at offset 0 of 168 bytes in /var/www/html/M2/app/code/Vendor/Module/Block/...
0
votes
1answer
23 views

Error when using command setup:di:compile .Sm/CartQuickPro

Repositories code generation... 1/7 [====>-----------------------] 14% < 1 sec 70.0 MiB Fatal error: Interface 'Magento\Framework\App\Action\HttpPostActionInterface' not found in /var/www/html/...
0
votes
0answers
32 views

Magento2.3.4 Compilation Error: MiBPHP Fatal error

I'm trying to upgrade an existing Magento 2.2.4 installation to 2.3.4. The initial step performed was to update to 2.3.0 first, which went fine and without any errors, but when I'm trying to update ...
4
votes
3answers
4k views

Magento 2 PHP Fatal error: Class not found when compiling

When I compile I get this error: PHP Fatal error: Class 'Magento\Catalog\Controller\Adminhtml\Category\Image\Upload' not found in /var/www/html/magento/app/code/Plazathemes/Override/Controller/...
1
vote
1answer
68 views

Magento 2.3.2: setup:di:compile not working getting out in command line after 14%

Hey there i am trying to run command setup:di:compile . its getting started but and stopping for sometimes on 14% and then its gettin out back to cli. i am not getting any error or exception so that ...
0
votes
1answer
17 views

Magento Stuck at running command

My Magento command for compile is stuck What should I do and what is the problem??
0
votes
2answers
122 views

Error running the `setup:di:compile` command Magento 2.3.0

Run:: /opt/plesk/php/7.2/bin/php -dmemory_limit=3G bin/magento setup:di:compile Error screenshot:: Any one can help me
2
votes
2answers
257 views

Why I still need to run setup:di:compile in developer mode?

Quick Intro I'm working on a payment module and using Magento 2.3.2 (irrelevant). As stated in many places, we don't need to run setup:di:compile when in developer mode (which is my scenario). As ...
0
votes
2answers
88 views

Magento 2: Unable to run setup:di:compile

Ran into this error when running setup:di:compile after composer install [RuntimeException] ...
1
vote
2answers
391 views

Magento 2.3 performance drop after running php bin/magento setup:di:compile

While working on a development instance I installed the stripe payment module and then ran php bin/magento setup:di:compile I hadn't previously done this on this install and it's been running for ...
0
votes
1answer
33 views

Is it good practice to edit custom extension's code after compilation

I get lots of adjustment requests (feature add, issue fix, etc) every day from one of my client. Their site is in production mode and they want the changes to take effect immediately. I believe ...
1
vote
4answers
7k views

Blank screen after compiling

After putting the site into production mode and running the compiler, the site just loads a blank white page. I've tried disabling all third party modules and it has not helped. I have all error ...
1
vote
2answers
45 views

Magento 2 - I am facing this every time I run upgrade and deploy command after applying changes

Each time I deploy some changes and run, upgrade compile deploy reindex cache clean commands I face these issues? Anyone ?? I have deployed child theme and after that, I have run these commands
0
votes
1answer
21 views

Important div tag commented out when on production mode

We noticed that some of our page layout has been broken. Did some debugging and found out that when in production mode there are some errors with the tags. Specifically: <!--?php <?php <?...
2
votes
2answers
52 views

Magento 2: Command returned non-zero exit code during submission on marketplace

I have submitted a module to the marketplace, I have tested it by all cases. I have switched to production mode but I am not getting any errors. However, I am getting a failure on submission with the ...
0
votes
1answer
32 views

Magento2 : Error when running setup:di:compile

I create a custom model and di.xml was written up, however when I try to run setup:di:compile, it said the "generated/code/Magento/MediaStorage/Model/File/Storage/Response/Interceptor.php" file can'...
7
votes
2answers
755 views

Magento 2: Run setup:di:compile a Specific Module

Is it possible to di compile to specific module instead of whole magento di compile ? Because, Whole Magento take a long time to compile. So, is it possible to di compile to specific module. php bin/...
7
votes
2answers
3k views

M2/ How to fix “Incompatible argument type: Required type: string. Actual type …”

A compilation was started. Interception cache generation... 6/7 [========================>---] 85% 1 min 404.0 MiB Errors during compilation: SkyFox\Supplier\UI\DataProvider\Supplier\...
1
vote
1answer
868 views

setup:di:compile VS rm -f var/generation

When we work in di.xml file for extend the functionality then we need to php bin/magento setup:di:compile setup:di:compile take 30 to 40 second or long in window. if we remove the generation folder/...
0
votes
1answer
99 views

Incompatible argument type: Required type: \Magento\Customer\Api\AddressRepositoryInterface

During compiling I've got the following compilation error: Incompatible argument type: Required type: \Magento\Customer\Api\AddressRepositoryInterface. Actual type: \Magento\...
0
votes
0answers
62 views

Magento 2.3 Class does not exist on error Compilation

When I tried to do the compilation via php bin/magento setup:di:compile, I got the following error. I installed Landofcoder's SMS notification extension. I was thinking the issue is arising due to ...
0
votes
2answers
537 views

Magento 2.3.3 GraphQl Error after upgrade while Compilation

After upgrade from magento 2.3.2 to 2.3.3 I get this error while Compilation: Fatal error: Declaration of Magento\QuoteGraphQl\Model\Cart\SetShippingAddressOnCart::execute(Magento\Framework\GraphQl\...
1
vote
2answers
119 views

Magento 2.3.2 Developer mode error in setup:di:compile

I am using the Magento 2.3.2 version. When I run the "setup:di:compile" command then Can't remove directory: directory is not empty error occurred. I have also set the permission of the generated ...
0
votes
0answers
186 views

Magento 2 : Class Magento\ServicesConnector\Api\ConfigInterface does not exist

When I'm setting up the Magento system, facing error as Class Magento\ServicesConnector\Api\ConfigInterface does not exist during setup:di:compile Does anyone have Magento_ServicesConnector ...
0
votes
1answer
69 views

Error when running di compile after upgrade from 2.2.9 to 2.3.2 (TEMANDO)

I've tried disabling the temando module but i'm still getting the error. Repositories code generation... 1/7 [====>-----------------------] 14% < 1 sec 74.0 MiB Fatal error: Declaration of ...
0
votes
2answers
403 views

setup:di:compile in the different modes

I'm trying to understand how compilation works in Magento 2 with regards to default mode, developer mode, and production mode. The docs state that auto compilation is enabled in developer mode, which ...
4
votes
1answer
46 views

Magento 2 What is the fastest way to get construction changes?

Whenever I made any changes on the construction method, I need to do bin/magento setup:di:compile to get any changes on my code. It was wasting my time, how can I get any changes faster than have to ...
0
votes
3answers
101 views

Error while running di:compile command

Getting ReflectionException] Class PayPal\Api\PayoutSenderBatchHeader does not exist error while running php bin/magento setup:di:compile command
0
votes
1answer
983 views

strict_types declaration must be the very first statement in magento 2.3.1

I have Magento 2.3.1. I am facing below error when I run command setup:di:compile. Fatal error: strict_types declaration must be the very first statement in the script in vendor/magento/module-...
3
votes
0answers
1k views

Reference to undeclared plugin with name 'stockedProductsFilterPlugin' warning in di compile magento 2.3.2

I have recently upgraded my site from Magento 2.2.6 to Magento 2.3.2. During each di compilation it shows a warning like main.INFO: Reference to undeclared plugin with name '...
12
votes
3answers
38k views

Magento2 - setup:di:compile

I have been working in a project with some custom code... this is our first "medium" Magento 2 project, so (as all people here I think) every day we learn new things, and we have to change the way to ...
0
votes
0answers
47 views

Magento2: setup:di:compile issue

Got the error below when I run the setup:di:compile command [Magento\Framework\Exception\LocalizedException] Source class "\Magento\Framework\EntityManager\OperationInterface" for "Magento\...
0
votes
2answers
129 views

During setup:di:compile getting error:- Source class “\PHPExcel_IO” for “PHPExcel_IOFactory” generation does not exist

When i'm running "setup:di:compile" or setting mode to "production" from "default" then getting following error:- Please help me to resolve this problem immediately. ------Update@Start--------------...
8
votes
3answers
1k views

Magento2 which command Run and when to Run

Kindly Clear Difference Between php bin/magento cache:flush and cache:clean and when they need to Run . which tasks Output to need cache:flush or clean ** and which task need these Commands => **di:...
1
vote
2answers
8k views

Magento 2: How to remove var/generation folder programatically?

How to remove var/generation folder programmatically. I have used below via command line: sudo rm -rf var/cache var/generation var/di But I want to do it programmatically. Is it possible?
1
vote
2answers
725 views

Magento 2.3.1 Incompatible argument type

I have an issue on compile on customs extension: ImaginationMedia\SocialOrder\Ui\DataProvider\Sales\Order\Donation\DataProvider Incompatible argument type: Required type: string. Actual ...
1
vote
0answers
486 views

Problem compiling!!! setup-di-compile yields segmentation error Magento 2.1.3

php bin/magento setup:di:compile Compilation was started. Proxies code generation... 0/7 [>---------------------------] 0% 1 sec 18.0 MiProxies code generation... 1/7 [====>--------------------...
-2
votes
1answer
482 views

Magento 2 : Issue on setup:di:compile

When I run the command php bin/magento setup:di:compile I am getting an error as below PHP Fatal error: Uncaught Error: Cannot instantiate interface Symfony\Component\Console\Output\...
2
votes
1answer
71 views

Out of memory when compiling Magento 2 - increasing memory doesn't work

When compiling Magento 2, I'm getting the error: Fatal error: Out of memory (allocated 294125568) (tried to allocate 32 bytes) in /vendor/zendframework/zend-code/src/Scanner/FileScanner.php on ...
5
votes
1answer
3k views

Magento 2: How to fix incorrect permissions after executing setup:upgrade and/or setup:di:compile

After running setup:upgrade and di compile from the bin directory, permission and ownership is reset and the magento store stops working. It works if I manually reset the permission. When the var/...
1
vote
2answers
136 views

404 after running setup:di:compile, need to always run chown -R root:www-data . afterwards

I have noticed that from time to time my Magento installation shows 404 on all pages. Panic! After doing some research I found out that running: chown -R root:www-data . in the document folder solved ...
1
vote
0answers
123 views

Magento 2 Problem with arguments in di.xml

The problem is this: I have a module, which passes arguments from di.xml to a class. Deploy mode is a developer. When I make changes in any arbitrary module or install a new module, and subsequently ...