[Fixed] after I upgraded my angular application from angular 5.2 to the latest. ng build produces this ERROR

Issue

ERROR in ./src/styles.css (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./src/styles.css)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError

(60:29) Unknown word

58 | .quiet {

59 | text-decoration: underline;

60 | display: inline-block; // to force underline on form button

61 | color: #0066cc;

62 | cursor: pointer;

Solution

its due to this line

60 | display: inline-block; // to force underline on form button

the // is not acceptable as a comment in css use /* */ instead.

Leave a Reply

(*) Required, Your email will not be published