M
M
mr_blond972020-04-15 22:02:37
JavaScript
mr_blond97, 2020-04-15 22:02:37

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

After updating Angular from 7 to 9, the following error appeared:

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 setting production true in environment.ts

export const environment = {
      
        production: true 
    
 };


What does this message mean and how can I fix it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question