Forum

laravel - cant comp...
 
Notifications
Clear all

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

   RSS

0
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  https://github.com/webpack-contrib/css-loader#url 
   Details:
    * 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.js11)
    at Object.getOptions (__my_directory__\node_modules\webpack\lib\NormalModule.js19)
    at Object.loader (__my_directory__\node_modules\css-loader\dist\index.js27)
    at processResult (__my_directory__\node_modules\webpack\lib\NormalModule.js19)
    at __my_directory__\node_modules\webpack\lib\NormalModule.js5
    at __my_directory__\node_modules\loader-runner\lib\LoaderRunner.js11
    at __my_directory__\node_modules\loader-runner\lib\LoaderRunner.js18

1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors
1 Answer
0
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)

 

This post was modified 1 tydzień temu by mrmucha

Odpowiedź

Author Name

Author Email

Your question *

 
Preview 0 Revisions Saved
Share: