While running the Asp.net zero project in the home page of the application i.e login page we are getting following errors in the console
“ Refused to apply style from 'http://localhost:62114/view-resources/Areas/SD/Views/_Bundles/vendors.bundle.min.css' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled.” “ Refused to apply style from 'http://localhost:62114/view-resources/Areas/SD/Views/_Bundles/account-layout-libs.min.css' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled” and so on. Please find the remaining missing files in the below screenshot
The above mentioned error indicating that the scripts/styles are missing in the project and I’ve cross checked the location mentioned in the error and found that the folder doesn’t have the scripts and styles.
2 Answer(s)
-
0
Before opening the solution, open a command prompt, navigate to root directory of *.Web.Mvc project and run "yarn" command to install client side dependencies.
Before running the project, we need to run a npm task to bundle and minify the CSS and JavaScript files. In order to do that, we can open a command prompt, navigate to root directory of *.Web.Mvc project and run npm run create-bundles command. This command should be run when a new npm package is being added to the solution.
Have you executed the yarn and create-bundles commands?
-
0
It is resloved now. Thank you.