2

Refused to apply style from

http://localhost/magento2-2.3.5-p1/pub/static/version1593595791/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css


because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Ansar Husain
3,4791 gold badge15 silver badges32 bronze badges
asked Jul 6, 2020 at 5:49
6
  • frontend loaded successfully or not? Commented Jul 6, 2020 at 5:51
  • Some icons are missing..but loaded the front end. Commented Jul 6, 2020 at 5:59
  • Magento installed fresh? Commented Jul 6, 2020 at 6:06
  • Yes.I have installed the fresh magento.Admin is unable to load. Commented Jul 6, 2020 at 6:07
  • please check my aswer Commented Jul 6, 2020 at 6:15

1 Answer 1

2

Step -1 Go To Magento\Framework\View\Element\Template\File\Validator.php

replace isPathInDirectories() Method

protected function isPathInDirectories($path, $directories)
 {
 $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
 if (!is_array($directories)) {
 $directories = (array)$directories;
 }
 foreach ($directories as $directory) {
 if (0 === strpos($realPath, $directory)) {
 return true;
 }
 }
 return false;
 }

Step -2 Run command

php bin/magento c:f
php bin/magento s:s:d -f

I hope this is helpful to you!!

answered Jul 6, 2020 at 6:14
3
  • It works..Thank You for the help. Commented Jul 6, 2020 at 6:42
  • welcome @SonaliGhule Commented Jul 6, 2020 at 6:46
  • @RasikMiyani to simplify the solution you can use my composer package, which solve the issue - packagist.org/packages/idealcode/magento2-windows-compatibility, install as composer require idealcode/magento2-windows-compatibility Commented Jul 6, 2020 at 8:56

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.