How to fix SassError: property “enableProdMode” must be followed by a ':'?

After upgrading Angular from 7 to 9 appeared the following error:

ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/dist/cjs.js??ref--13-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: property "enableProdMode" must be followed by a ':'
 on line 1 of src/main.ts
 from line 4 of D:\Projects\HelloWorldProject.HelloWorld.Frontend\src\styles.scss
>> import { enableProdMode } from '@angular/core';
---------^

SassError: SassError: property "enableProdMode" must be followed by a ':'
 on line 1 of src/main.ts
 from line 4 of D:\Projects\HelloWorldProject.HelloWorld.Frontend\src\styles.scss
>> import { enableProdMode } from '@angular/core';
---------^

 at Object.callback (D:\Projects\HelloWorldProject.HelloWorld.Frontend\node_modules\sass-loader\dist\index.js:73:16)
 at Object.done [as callback] (D:\Projects\HelloWorldProject.HelloWorld.Frontend\node_modules\neo-async\async.js:8067:18)
 at options.error (D:\Projects\HelloWorldProject.HelloWorld.Frontend\node_modules\node-sass\lib\index.js:294:32)
 @ ./src/styles.scss 2:26-251
 @ multi ./src/assets/styles/kendo_all.css ./src/styles.scss


Tried to set to true in production environment.ts

export const environment = { 
 production: true 
 };


What means this message and how to fix it?
April 19th 20 at 12:13
0 answer

Find more questions by tags WebpackSassAngularJavaScript