angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng build works but emits a warning

Open patrickgdl opened this issue 8 years ago • 7 comments

Versions

Angular CLI: 1.7.1
Node: 6.9.5
OS: win32 x64
Angular: 5.2.6

@angular/cli: 1.7.1
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.1
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.4.2
webpack-bundle-analyzer: 2.11.0
webpack: 3.11.0

Repro steps

  • ng build --prod --base-href ./

Observed behavior

ng build works as expected but emit this warning and it break my css:

WARNING in Invalid character(s) '; ' at 324:2. Ignoring.

Desired behavior

No warning and no breaking

Mention any other details that might be useful (optional)

Where can I find this character at 324:2?

patrickgdl avatar Feb 26 '18 17:02 patrickgdl

I found the problem, was a ; lost in one of various css that I have, would be nice if this error appeared more clearly and still in ng serve.

patrickgdl avatar Feb 27 '18 12:02 patrickgdl

This is not a bug, can be closed.

fengerzh avatar Mar 09 '18 06:03 fengerzh

I have a similar issue, how can I find the offending value? In my case it's an 'Invalid background value at 5609:18'. I've combed through the css / scss files and corrected all my background values yet the warning persists... Thanks

Eddie541 avatar Apr 17 '18 20:04 Eddie541

My workaroung until find the offending value was to prod with ng build --extract-css=false.

patrickgdl avatar Apr 18 '18 19:04 patrickgdl

in my case it was background: ""; in a third-party css. I changed it to background: transparent; and I have no warnings now.

ogousa avatar May 14 '18 15:05 ogousa

I have a similar issue, how can I find the offending value? In my case it's an 'Invalid background value at 5609:18'. I've combed through the css / scss files and corrected all my background values yet the warning persists... Thanks

Same issue with me, did you already fixed it?

RyanZhou713 avatar Apr 24 '19 06:04 RyanZhou713

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.