I am new to Magento. I have read the requirements for Magento. I dont have a linux box and I have to make do with my Windows one.
I am trying to install Magento 2.3 with sample data on XAMPP 7.3 by following https://www.mageplaza.com/devdocs/how-install-magento-2-windows.html.
I completed the installation. However when i hit localhost/magento (i have named the dir as magento in htdocs), it doesnt load the static assets like iamges, js, fonts. So i get almost an empty page
When i inspected the page(in chrome browser) and i noticed that static assets were not going loaded as most of the fonts, js etc were not there in pub/static dir.
I tried running magento setup:static-content:deploy -f to deploy the static files.
However there is no improvement and the page is empty (http://localhost/magento).
I am grateful for any help in resolving this issue.
Thanks
- 
 Please check below url ==> magento.stackexchange.com/questions/279966/…Ishvar Patel– Ishvar Patel2020年06月27日 12:19:31 +00:00Commented Jun 27, 2020 at 12:19
- 
 Have you looked into running linux in windows using hyper v? Long term could be easier. Or maybe docker via wsl docs.docker.com/docker-for-windows/wsl plenty of magento 2 docker stacks availableDominic Pixie– Dominic Pixie2020年06月27日 19:55:27 +00:00Commented Jun 27, 2020 at 19:55
1 Answer 1
This is Magento bug. Wrong paths to Windows are generated. The fixed fix is
Magento 2.3.0 - 2.3.3
#/vendor/magento/framework/View/Element/Template/File/Validator.php:140
the string
if (0 === strpos($realPath, $directory)) {
 return true;
}
to replace
$realDirectory = $this->fileDriver->getRealPath($directory);
if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
 return true;
}
If You can't find out the (/vendor/magento/framework/) folder in magento 2.2.7 - 2.3.3 . Then You can check it here:
#lib\internal\Magento\Framework\View\Element\Template\File\Validator.php
And your other magento version check this link :-
https://magento.stackexchange.com/a/252293/85907
After change your run command :-
php bin/magento c:c
php bin/magento c:f
Hope this help you
Thanks ...
- 
 Hello @IT guy check more link --- magento.stackexchange.com/a/269111/85907Mohit Patel– Mohit Patel2020年06月27日 12:30:22 +00:00Commented Jun 27, 2020 at 12:30
- 
 Thanks a lot. I will checkIT guy– IT guy2020年06月28日 16:51:52 +00:00Commented Jun 28, 2020 at 16:51
- 
 I followed your suggestion to replace the code at /vendor/magento/framework/View/Element/Template/File/Validator.php:140. It worked !! Thanks. I have marked the response accordinglyIT guy– IT guy2020年06月28日 16:58:55 +00:00Commented Jun 28, 2020 at 16:58