laravel - cant comp...
Clear all

laravel - cant compile scss (npm run dev or npm run watch)

1 Posty
1 Users
0 Reactions
1,301 Widok
Topic starter
ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
ValidationError: Invalid options object. CSS Loader has been initialized using an options object that does not match the API schema.
 - options.url should be one of these:
   boolean | object { filter? }
   -> Allows to enables/disables `url()`/`image-set()` functions handling.
   -> Read more at 
    * options.url should be a boolean.
    * options.url should be an object:
      object { filter? }
    at validate (__my_directory__\node_modules\webpack\node_modules\schema-utils\dist\validate.js:105:11)
    at Object.getOptions (__my_directory__\node_modules\webpack\lib\NormalModule.js:527:19)
    at Object.loader (__my_directory__\node_modules\css-loader\dist\index.js:31:27)
    at processResult (__my_directory__\node_modules\webpack\lib\NormalModule.js:701:19)
    at __my_directory__\node_modules\webpack\lib\NormalModule.js:807:5
    at __my_directory__\node_modules\loader-runner\lib\LoaderRunner.js:399:11
    at __my_directory__\node_modules\loader-runner\lib\LoaderRunner.js:251:18

1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors
1 Answer
Topic starter

first workaraound, downgrade css-loader

open packages.json and add

    "devDependencies": {
        "css-loader": "5.2.7"

then run npm update 

(not working? delete ./node_modules/css-loader then run update again)



Author Name

Author Email

Your question *

Preview 0 Revisions Saved