Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

-2
votes
1answer
44 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
29 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 ...
1
vote
2answers
68 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
2answers
47 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
25 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 ...
1
vote
0answers
70 views

Generation Error for Source Class

I'm trying to compile etc. after recently upgrading to Magento 2.3.1. I use this command: $ php -dmemory_limit=-1 bin/magento setup:di:compile which returns this error: Source class "\Magento\...
0
votes
3answers
53 views

When to run compile command in Magento?

I have updated the CSS for our site. After updating, I ran the below commands: php bin/magento setup:static-content:deploy -f php bin/magento cache:flush But the changes are not applied when I ...
0
votes
0answers
28 views

Why di compile not working with 100% in magento 2? [duplicate]

I have Magento 2 setup But when I run cmds: php bin/magento s:up Next then I ran php bin/magento s:d:c Every time try this without error it will be moved to next How I can solve this? My ...
2
votes
1answer
65 views

How I can solve the di:compile error in Magento 2?

When I run setup:di:compile I got error Errors during compilation: Vendor\CustomRegistration\Model\Customer\DataProvider Incompatible argument type: Required type: bool. Actual type: \Vendor\...
4
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
49 views

When to compile and deploy content

After a year or so of working in Developer Mode, I'm now using Production Mode. As I deploy updates to modules or designs, I'm wondering when I should run the below commands. At the moment, my order ...
0
votes
1answer
172 views

Magento 2.1.15: Compilation error: Class Magento\Framework\Serialize\Serializer\Json does not exist

I did the following command on the CLI of a Magento 2.1.15 installation: php bin/magento setup:di:compile -vvv The following exception occurred: [RuntimeException] ...
0
votes
2answers
43 views

setup:di:compile ignores third party type definition (Monolog)

I have a DI configuration for a custom exception handler: <type name="My\Logger\Handler\ExceptionHandler"> <arguments> <argument name="formatter" xsi:type="object">My\...
1
vote
0answers
42 views

Magento2: impossible run command in terminal setup:di:compile

Impossible run command: php bin/magento setup:di:compile return error: [@s1 public_html]$ php bin/magento setup:di:compile PHP Fatal error: Uncaught Error: Cannot use object of type ...
0
votes
1answer
49 views

Issues updating Magento 2 Extension Namespace to uppercase

I think there were previous issues with Magento 2 allowing extensions namespaces to be lower case when we initially submitted ours. But now, it seems that Magento 2.2.x enforces uppercase first ...
2
votes
3answers
175 views

CLI: What is the difference between “setup:static-content:deploy” and “dev:source-theme:deploy”?

I wanto to know the difference between: php bin/magento setup:static-content:deploy and php bin/magento dev:source-theme:deploy I know that second receives as options name of specific vendor, ...
0
votes
0answers
38 views

fatal error on compile command

Today i had installed Fresh magento installation., When i tried to run the compile command, i got below error. Fatal error: Declaration of Magento\Checkout\Helper\Data\Proxy::sendPaymentFailedEmail(...
0
votes
1answer
53 views

Magento 2.2.4 - Adding 'Declared Value' to UPS Shipping Calculations

It appears the UPS integration inside Magento 2 does not include the declared value when calculating shipping quotes which can drastically make the quotes way off. Anyone else experience this and ...
2
votes
0answers
175 views

Vertex generation doesn't exist …?

Magento 2.2.4, php7. I' ve been having this error when I try to switch to production and when i try to di:compile; Source class \Vertex for \Vertex\Mapper generation does not exist. No errors in ...
0
votes
2answers
657 views

setup:di:compile error | source class generation does not exist

bin/magento setup:di:compile give me this error Magento version 2.2.5 Source class "\Vendor\Module\Model\PostProductsInterface" for "\Vendor\Module\Model\PostProductsRepository" generation does not ...
1
vote
1answer
57 views

Magento 2.2.5 : Runtime Exception during setup:di:compile

The issue started when I was attempting to enter production mode with php bin/magento deploy:mode:set production Upon researching the issue, I attempted to see if the error gave more information ...
2
votes
1answer
79 views

Magento2: php bin/magento setup:di:compile issue

When I run this command php bin/magento setup:di:compile got the error below: [ReflectionException] Class Magento\Catalog\Model\Product\Link\Resolver does ...
0
votes
1answer
110 views

Not able to compile complete in Magento2

I am running compile command php bin/magento setup:di:compile Compilation was started. Repositories code generation... 1/7 [====>-----------------------] 14% < 1 sec 54.0 MiB You have new mail ...
1
vote
1answer
354 views

Magento 2 run setup:di:compile command on a shared hosting with limited memory_limit (max 512M)

I am trying to execute php bin/magento setup:di:compile after enabling a custom module created on my Magento2 store. However, I am using a shared hosting which allows me to set memory_limit upto 512 ...
2
votes
0answers
24 views

Magento 2 : Most of the Links are not working after upgrade and compile in magento 2

Most of the Links are not working after upgrade and compile in magento 2.1 Like wish list, Add to Compare, edit/Delete product on cart page, Compare menu etc. Is there any solution ? The href ...
1
vote
3answers
807 views

ReflectionException - Class does not exist error after 2.2.5 from 2.1.9

I have upgraded a Magento 2.1.9 store to 2.2.5. The upgrade seems successful, and everything is working in development mode, but I am not able to compile or put the store into production mode. The ...
6
votes
2answers
291 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/...
0
votes
1answer
25 views

folder writen issue come on website after updating setup of magento 2

Its come many time after upgrading setup Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/home/soft/public_html//var/cache/" is not writable in /home/soft/public_html//vendor/magento/...
2
votes
0answers
68 views

Ignore specific path when running setup:di:compile in Magento 2.2.2

Is there a additional command to add to setup:di:compile command to ignore a specific path compilation? In Magento 2 this could be done with additional parameter --exclude-pattern, but in Magento 2.2 ...
1
vote
1answer
24 views

Magetno 2 What happen with App, when we put the site down

I have live site and mobile App and I need to upload one module on site. What happen with the mobile App, when I upgrade and compile magento site. Is mobile app will work at the same time when ...
0
votes
2answers
116 views

How to Remove Runtime Exception during Setup:di:compile command in magento 2.1.12?

[RuntimeException] Source class "\Magento\CatalogRule\Api\Data\RuleLabelInterface" for "Magent o\CatalogRule\Api\Data\RuleLabelInterfaceFactory" generation does not exist .
1
vote
1answer
179 views

Magento 2: compile - Class Not_Existing_Class does not exist

I have below error while I am compiling the Magento Store. it took very long time and finally gave this error. php bin/magento setup:di:compile
1
vote
5answers
521 views

magento2.2.3 site is blank after di compie

Can anyone help me how to resolve the below problem. after di:compile command my site is blank in windows xampp server. Thanks
4
votes
1answer
130 views

Magento-2.1 : Warning: Missing argument 2 for OAuth\Common\Consumer\Credentials::__construct()

I have used below code, it's working in Magento-2.2 but not working in Magento-2.1 after code compilation. public function __construct( \OAuth\Common\Consumer\CredentialsFactory $...
0
votes
1answer
251 views

Magento 2: showing error when running command setup:di:compile

I am getting this error when running setup:di:compile command, Plese help this is the error in SSH showing Compilation was started. Area configuration aggregation... 5/7 [====================>-...
0
votes
1answer
142 views

Magento Vagrant installation does not generate classes

I have switched to windows for a new project, and just setup Magento 2 using this vagrant box: https://github.com/paliarush/magento2-vagrant-for-developers I have it working, it is displaying ...
0
votes
1answer
161 views

magento setup:di:compile crashes: Warning: array_replace_recursive(): Argument #1 is not an array in Writer.php on line 135

I uninstalled a module with command: magento module:disable Dotdigitalgroup_Email and once I run: magento setup:di:compile I get this error message: Warning: array_replace_recursive(): Argument #...
0
votes
2answers
3k 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 ...
0
votes
1answer
310 views

setup-di-compile | PHP Fatal | Cannot declare class Magento\Framework\Console\Cli

When I try to run command setup:di:compile I get the following error: [http]$ php-7.0 bin/magento setup:di:compile The directory "/microcloud/domains/operm2/domains/domainname.co.uk/http/var/...
1
vote
0answers
347 views

“Fatal error: Uncaught TypeError: Argument 1 passed to […]::__construct() must be an instance of […]” after (re-)compile

So I've inherited this weirdly behaving (and horribly tinkered) shop containing some external product and customer import scripts. One of these scripts ('importcustomer_fields.php', located in the ...
1
vote
0answers
37 views

Disable di:compile PHP Comments check in Magento 2.2.2

I Upgraded to Magento 2.2.2 and now di:compile checks if @params comments for constructors are correct. I have many modules where the comments are incorrect but the params are correct, so I want to ...
0
votes
0answers
223 views

setup:di:compile - Warning: Narrowing occurred during type inference

I'm getting this error when running php -f bin/magento setup:di:compile Warning: Narrowing occurred during type inference Does anyone know how to fix it? php -f bin/magento setup:di:compile -...
0
votes
2answers
271 views

How can I remotely debug Magento 2 using xdebug when I do not have the “generated” files locally?

I'm already familiar with xdebug, and debugging Magento 1 using it. Now that I'm working with Magento 2, I'm finding that my debugging sessions are failing with error messages like: Cannot find a ...
1
vote
1answer
660 views

magento 2.2.1 setup:di:compile not finished / Fails

I did an upgrade from Magento 2.1.10 to 2.2.1, after some known issues the site is up again. When I run a command setup:di:compile the compilation seems to be broken (see picture below). Also the var/...
6
votes
1answer
5k 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
1k views

Magento 2.2 Build system

I trying to setup build system for setup:di:compile and setup:static-content:deploy based on official devdocs. Build system The build system compiles code and generates static view files for ...
4
votes
3answers
3k views

How to resolve unserialize issue [closed]

My extension has stopped working since updating to Magento 2.2.0 When running di:compile we get the following error: Errors during compilation: Vendor\Module\Model\ResourceModel\...
1
vote
1answer
1k views

Error compiling Magento2

I have an error during the compilation due to a not completed developed module. As I'm still working on the module I would disable it and continue the compilation. I used to do that on magento1. I ...
10
votes
3answers
21k 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
1answer
147 views

Magento 2 : Error during compilation

I encountered an error on running php bin/magento setup:di:compile on CLI Error is : [Zend\Code\Exception\RuntimeException] No tokens were provided How to fix this issue ?