Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bundler & Minifier error 0: Expected closing parenthesis, found ','

I am getting some really annoying errors when debugging my ASP .NET Core application in VSCode.

It seems to be related to my css bundler/minifier, but I have no idea how this is possible as it was working fine Friday afternoon but this morning it is having issues.

My css looks like this:

body {
    padding-top: 50px;
    padding-bottom: 20px;
}

/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Hide/rearrange for smaller screens */
@media screen and (max-width: 767px) {
    /* Hide captions */
    .carousel-caption {
        display: none;
    }
}

.high {
    background-color: rgb(255,0,0,0.5);
}

.medium {
    background-color: rgb(255,255,0,0.5);
}

.low {
    background-color: whitesmoke;
}

#test {
    background: blue;
}

When I try to debug, I get these errors

c:\Users\bassie\Documents\VSCode\DSSTools\wwwroot\css\site.min.css(22,34,22,34): Bundler & Minifier error 0: Expected closing parenthesis, found ',' [c:\Users\bassie\Documents\VSCode\DSSTools\DSSTools.csproj]

c:\Users\bassie\Documents\VSCode\DSSTools\wwwroot\css\site.min.css(22,34,22,34): Bundler & Minifier error 0: Expected function, found ',' [c:\Users\bassie\Documents\VSCode\DSSTools\DSSTools.csproj]

c:\Users\bassie\Documents\VSCode\DSSTools\wwwroot\css\site.min.css(22,38,22,38): Bundler & Minifier error 0: Expected semicolon or closing curly-brace, found ')' [c:\Users\bassie\Documents\VSCode\DSSTools\DSSTools.csproj]

c:\Users\bassie\Documents\VSCode\DSSTools\wwwroot\css\site.min.css(26,36,26,36): Bundler & Minifier error 0: Expected closing parenthesis, found ',' [c:\Users\bassie\Documents\VSCode\DSSTools\DSSTools.csproj]

c:\Users\bassie\Documents\VSCode\DSSTools\wwwroot\css\site.min.css(26,36,26,36): Bundler & Minifier error 0: Expected function, found ',' [c:\Users\bassie\Documents\VSCode\DSSTools\DSSTools.csproj]

c:\Users\bassie\Documents\VSCode\DSSTools\wwwroot\css\site.min.css(26,40,26,40): Bundler & Minifier error 0: Expected semicolon or closing curly-brace, found ')' [c:\Users\bassie\Documents\VSCode\DSSTools\DSSTools.csproj]

If I delete all my css the errors go away.

I also noticed that if I delete just the 3 css rules (high, medium, low), the errors also go away.

What am I supposed to do with these errors, and how can I debug these types of messages?

like image 756
Bassie Avatar asked Aug 31 '25 17:08

Bassie


1 Answers

I see that the first error is

Expected closing parenthesis, found ','

And you have

background-color: rgb(255,0,0,0.5);

in a couple of places. That version - rgb - does not expect an alpha value and presumably sets off all the errors. Finding a period where it expects the closing parenthesis. Try:

background-color: rgba(255,0,0,0.5);

instead in your .high and .medium declarations.

like image 94
Mark Avatar answered Sep 02 '25 07:09

Mark