Magento2: Magento setup:di:compile in Windows renders main page unusable

Created on 16 Oct 2017  路  10Comments  路  Source: magento/magento2


Preconditions


  1. Version: 2.2.0
  2. PHP:
PHP 7.0.24 (cli) (built: Sep 26 2017 04:59:34) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.24, Copyright (c) 1999-2017, by Zend Technologies
  1. MySQL
mysql  Ver 14.14 Distrib 5.7.19, for Win32 (AMD64)
  1. Windows Server 2012 AWS Base image

Steps to reproduce

  1. Install Magento in WAMP
  2. Execute setup:di:compile

Expected result

  1. Magento should show its UI without issues

Actual result


  1. screen shot 2017-10-16 at 17 08 54

However, the command setup:di:compile worked without issues.

screen shot 2017-10-16 at 17 08 13

Format is valid needs update

Most helpful comment

For now I saw two main reasons of different behavior: different DIRECTORY_SEPARATOR and some differences in XML/XSD processing. This needs to be debugged step-by-step on a problematic environment.

In the issue I referenced recently author found out that

If I remove generated/ folder, everything starts to work and I see the home page and backend logic page

To just spot the difference in compilation, you may also perform it on Linux, commit to some temporary repo and then perform compilation on Windows.

All 10 comments

Can you reproduce an issue using a supported operating system: http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements-tech.html? Note that Windows is not in the list.

I have same problem.

@duongquyet on a supported environment?

Hi @orlangur ,
Magento should work on Window. I'm magento developer. I think a lot developer work on Window.

Nope, it may work, but it should not. Just check a link I posted.

Normally there should be a check during installation which disallows unsupported platform similar to unsupported PHP version but it is not implemented yet. So that anyone bypassing such check knows he is using Windows at his own risk.

Hi @orlangur ,
Do you magento developer? What do you mean? If i use Window, I shouldn't be developer magento?

If i use Window, I shouldn't be developer magento?

No, of course :) I was never using Linux as my host OS and I was using WIndows as host OS most of the time, until I switched to MacBook.

But you shouldn't use Magento directly on Windows.

There are many options nowadays, like Vagrant/Docker or even a plain VM with some Ubuntu installed. There is no sense to develop Magento under Windows as it is unlikely your store will be hosted on such environment.

@orlangur Vlad, regardless of what is it saying under http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements-tech.html, can you at least point/guide where the issue could be? What is the difference between Linux/Windows in terms of DI compilation?

For now I saw two main reasons of different behavior: different DIRECTORY_SEPARATOR and some differences in XML/XSD processing. This needs to be debugged step-by-step on a problematic environment.

In the issue I referenced recently author found out that

If I remove generated/ folder, everything starts to work and I see the home page and backend logic page

To just spot the difference in compilation, you may also perform it on Linux, commit to some temporary repo and then perform compilation on Windows.

Closing due to lack of response from author for 15 days. Feel free to provide additional information anytime later and issue may be reopened.

Was this page helpful?
0 / 5 - 0 ratings