NopCommerce html, css file are not loading when I first install

4 месяца назад
can we connect any desk please to fix this problem , please?
4 месяца назад
You sent me this in PM. Please don't use PM for topic related issues.
Yes, downloaded Nopcommerce without source code and run Nop.web.exe file
but giving me the following error
This site can’t be reached localhost refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

Where are you running?  On your local PC?  Windows 10 / 11?
After you run Nop.Web.exe, do you see the messages that say (example)?:
      Now listening on: http://localhost:5000
      Now listening on: https://localhost:5001

Your port may differ, but are you navigating browser to URL  in message - e.g.,
https://localhost:5001
4 месяца назад
Yeah I browse port in message
3 месяца назад
Hi I am also facing the same problem.
Here are some images to help better understand problems.

Front end page:
https://ibb.co/KhhXp6D

Network tab:
https://ibb.co/fCB4jqt
3 месяца назад
Ok I found the solution guys.

It was the NUglify. Just go to src\Presentation\Nop.Web.Framework\WebOptimizer\Processors\NopCssMinifier.cs

and the comment out this codes.


                /*
                var input = context.Content[key].AsString();
                var result = Uglify.Css(input, new CssSettings());

                var minified = result.Code;

                if (result.HasErrors)
                {
                    await EngineContext.Current.Resolve<ILogger>()
                        .WarningAsync($"Stylesheet minification: {key}", new(string.Join(Environment.NewLine, result.Errors)));
                }

                content[key] = input.AsByteArray();
                */


3 месяца назад
Hi, you don't have to change anything in the code. Just set value of below two parameters to false in your appsettings.json file.

"EnableJavaScriptBundling": false,
    "EnableCssBundling": false

This will do the trick, nothing else since you are working in a dev environment :)

Happy coding,
Atul