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
0
votes
2answers
1k 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
66 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
150 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
345 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 ...
2
votes
1answer
869 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
25 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 ...
7
votes
2answers
2k 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
3answers
3k 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 ...
7
votes
2answers
737 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
27 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
145 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
25 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
145 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
332 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
979 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
225 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
351 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
207 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
262 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 #...
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
1answer
509 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
516 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
38 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
346 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
577 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
1k 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
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/...
2
votes
1answer
2k 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
4k 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 ...
12
votes
3answers
37k 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
186 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 ?
1
vote
0answers
185 views

uncaught error class magento/indexer/model/config/reader

I have been facing this issue since ui upgraded my magento site form 2.0.7 to 2.1.5. When trying to run magento setup:upgarde command to install extension it gives uncaught error class magento/indexer/...
0
votes
1answer
129 views

Technical Review Failed on: deploy:mode:set production

I recently submitted a module to the Magento Marketplace for Technical review; it got rejected with the following error: Command returned non-zero exit code: php -f /var/www/html/bin/magento ...
4
votes
3answers
2k views

Magento 2 - setup:di:compile (general question)

This is a general question about the magento 2 cli, and what the setup does. Every time i want to install or uninstall a module I have to run the following command. setup:di:compile What does this ...
5
votes
3answers
521 views

Cannot put magento 2 into production mode due to an error in setup:di:compile:

We are trying to put a site into production mode but we get errors during the setup:di:compile step. Below all the details I think are relevant: Php 7.0.15 I have cleaned the cache with bin/magento ...
2
votes
1answer
164 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?
5
votes
3answers
16k views

Uncaught TypeError: Argument 1 passed to […] must be an instance of

I have been having this issue for several weeks now and after looking through similar issues on this site and others, I still can't figure out how to solve this problem. After successfully executing ...
1
vote
1answer
589 views

Magento 2: Compile-Multi-Tenant “Not Defined”

My Module reject from Marketplace QA testing. The error they gave was: [ReflectionException] Class \Fanplayr\SmartAndTargeted\Controller\Index\Index does not exist They also let me know test command ...
2
votes
2answers
4k views

Magento 2 HTTP error 500 on categories after compilation

I am working on a Magento 2.1 website for one of my clients. When running setup:di:compile, my Magento files are successfully compiled without errors. When I open the frontend of my website, my ...
1
vote
1answer
247 views

Magento 2: Di Compile SER Files

When we run php bin/magento setup:di:compile It will generate below files in \magento\var\di folder adminhtml.ser crontab.ser frontend.ser global.ser setup.ser webapi_rest.ser webapi_soap.ser I ...
0
votes
4answers
4k views

Extra parameters passed to parent construct

When I run setup:di:compile command in M2, I got this error in one of my modules. Extra parameters passed to parent construct: $context File name : edit.php Location : /app/code/Vendor/Module/...
0
votes
1answer
371 views

Incorrect dependency error when run setup:di:compile command in magento 2.1.x

I have run command bin/magento setup:di:compile in my Magento 2.1.x. I got below error. Solwin\ProductAttachment\Controller\Adminhtml\Attachment Incorrect dependency in class Solwin\...
0
votes
1answer
60 views

Object instantiations in compiled mode

I was poking around for academic reasons on how the objects are instantiated. I figured out most of the things and the differences between factories (dev, compiled, production) but something scared me....
0
votes
1answer
166 views

When to run magento:setup:compile?

If this question has been answered elsewhere I will delete this one. From a good look around, there doesn't seem to be a solid answer. When I am developing an extension for Magento 2(.1), do I have ...
6
votes
1answer
753 views

Magento 2: Why di compile is not 100%?

When we run php bin/magento setup:di:compile Why all are not will be 100% & 7/7? $ php bin/magento setup:di:compile Compilation was started. %message% 0/7 [>---------------------------] 0% ...
1
vote
0answers
480 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 [====>--------------------...
1
vote
0answers
551 views

Why does setup:di:compile fail on PHP 7 but not on PHP 5.6?

Running: Ubuntu 16.04 LTS (also happens on Debian Stretch) Magento 2.1.1 PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS ) Magento installed and DB set up etc. I run: rm -rf var/di/* var/generation/* var/...
4
votes
3answers
3k 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/...
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?