D
D
DmitryLife2021-01-29 18:17:26
Node.js
DmitryLife, 2021-01-29 18:17:26

Why does npm run dev fail?

When executing the "npm run dev" command, the following problem occurs:

> @ dev c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it                             
> npm run development                                                                          
                                                                                               
                                                                                               
> @ development c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it                     
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules 
                                                                                               
98% after emitting SizeLimitsPlugin                                                            
                                                                                               
 ERROR  Failed to compile with 2 errors                                                        
 error  in ./resources/sass/app.scss                                                           
                                                                                               
Module build failed (from ./node_modules/css-loader/index.js):                                 
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):           
ValidationError: Invalid options object. Sass Loader has been initialized using an options obje
 - options has an unknown property 'outputStyle'. These properties are valid:                  
   object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }        
    at validate (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\schema
    at Object.loader (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\s
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\webpack\lib\Norm
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\loader-runner\li
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\loader-runner\li
    at runSyncOrAsync (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\
    at iterateNormalLoaders (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_mo
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\loader-runner\li
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\enhanced-resolve
    at processTicksAndRejections (internal/process/task_queues.js:79:11)                       
                                                                                               
 error  in ./resources/sass/app.scss                                                           
                                                                                               
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):                             
ValidationError: Invalid options object. Sass Loader has been initialized using an options obje
 - options has an unknown property 'outputStyle'. These properties are valid:                  
   object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }        
    at validate (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\schema
    at Object.loader (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\s
                                                                                               
 @ ./resources/sass/app.scss 2:14-253                                                          
                                                                                               
     Asset      Size   Chunks             Chunk Names                                          
/js/app.js  1.41 MiB  /js/app  [emitted]  /js/app                                              
                                                                                               
ERROR in ./resources/sass/app.scss                                                             
Module build failed (from ./node_modules/css-loader/index.js):                                 
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):           
ValidationError: Invalid options object. Sass Loader has been initialized using an options obje
 - options has an unknown property 'outputStyle'. These properties are valid:                  
   object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }        
    at validate (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\schema
    at Object.loader (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\s
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\webpack\lib\Norm
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\loader-runner\li
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\loader-runner\li
    at runSyncOrAsync (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\
    at iterateNormalLoaders (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_mo
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\loader-runner\li
    at c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\enhanced-resolve
    at processTicksAndRejections (internal/process/task_queues.js:79:11)                       
 @ ./resources/sass/app.scss                                                                   
                                                                                               
ERROR in ./resources/sass/app.scss (./node_modules/css-loader??ref--5-2!./node_modules/postcss-
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):                             
ValidationError: Invalid options object. Sass Loader has been initialized using an options obje
 - options has an unknown property 'outputStyle'. These properties are valid:                  
   object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }        
    at validate (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\schema
    at Object.loader (c:\Programs\OpenServer\OSPanel\domains\localhost\korona-it\node_modules\s
 @ ./resources/sass/app.scss 2:14-253                                                          
npm ERR! code ELIFECYCLE                                                                       
npm ERR! errno 2                                                                               
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --p
npm ERR! Exit status 2                                                                         
npm ERR!                                                                                       
npm ERR! Failed at the @ development script.                                                   
npm ERR! This is probably not a problem with npm. There is likely additional logging output abo
                                                                                               
npm ERR! A complete log of this run can be found in:                                           
npm ERR!     C:\Users\ACER\AppData\Roaming\npm-cache\_logs\2021-01-29T14_55_02_953Z-debug.log  
npm ERR! code ELIFECYCLE                                                                       
npm ERR! errno 2                                                                               
npm ERR! @ dev: `npm run development`                                                          
npm ERR! Exit status 2                                                                         
npm ERR!                                                                                       
npm ERR! Failed at the @ dev script.                                                           
npm ERR! This is probably not a problem with npm. There is likely additional logging output abo
                                                                                               
npm ERR! A complete log of this run can be found in:                                           
npm ERR!     C:\Users\ACER\AppData\Roaming\npm-cache\_logs\2021-01-29T14_55_03_001Z-debug.log


I can't figure out what exactly is wrong

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DmitryLife, 2021-01-30
@DmitryLife

In the end, reinstalling sass-loader to an older version helped me.
npm uninstall --save-dev sass-loader
npm install --save-dev [email protected]

S
Sergey delphinpro, 2021-01-29
@delphinpro

Well, it's written in black and white:

options has an unknown property 'outputStyle'. These properties are valid:
object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }

need not write
{
  outputStyle: 'compressed'
}

a
{
  sassOptions: {
    outputStyle: 'compressed'
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question