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
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/...
24
votes
4answers
4k views

Which compilation commands are needed in developer mode and when?

Can somebody give me instructions when to run which compilation commands in Magento 2 developer mode? I'm not sure if I understand it right yet. In the devdocs, developer mode is described as follows:...
11
votes
3answers
25k 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 ...
11
votes
1answer
9k views

Cannot declare interface , because the name is already in use

After creating a simple interface in my new module. I typed in bin/magento setup:di:compile, and I get an error saying that the name is already in use. Here is my code: namespace Company\Test\Api; ...
5
votes
1answer
3k views

Problems with less variables in _theme.less

I use below media queries in my custom _theme.less like & when (@media-common = true) { } but when I execute this command bin/magento setup:static-content:deploy I get variable @media-common is ...
5
votes
3answers
13k 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 ...
6
votes
1answer
617 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% ...
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 ...
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 ...
4
votes
2answers
2k 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/...
4
votes
1answer
4k views

Magento 2: Error during compilation Incompatible argument type

In Continue with Magento 2: Error during compilation I have below error while running php bin/magento setup:di:compile Errors during compilation: Custom\Module\Model\ResourceModel\...
1
vote
2answers
2k views

Magento 2: Error during compilation

I have below error while running php bin/magento setup:di:compile Errors during compilation: Custom\Module\Block\BuyingListIndex Incorrect dependency in class Custom\Module\...
0
votes
1answer
342 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
2answers
553 views

I run php bin/magento module:enable, page stops loading after that

Fresh install of M2.1 on a Turnkey LAMP (with updated php 5.6 and mysql). I'm trying to test install a 3rd party module, and one of the commands is: <code>php bin/magento module:enable ...