Nick_K
Nick_K

Reputation: 623

Webpacker fails compilation after I add sass loader npm package

I really have no idea why I am getting the following:

   ERROR in ./app/javascript/packs/application.scss (./node_modules/css-loader/dist/cjs.js??ref--6-1!./node_modules/postcss-loader/src??ref--6-2!./node_modules/sass-loader/dist/cjs.js??ref--6-3!./app/javascript/packs/application.scss)
    Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
    TypeError: this.getOptions is not a function

when I include sass-loader to package.json with

yarn add sass-loader

If i remove it with yarn remove sass-loader, webpacker compiles everything with no error

Thank you

Upvotes: 0

Views: 558

Answers (1)

Iwan B.
Iwan B.

Reputation: 4166

Try to install an earlier version. In my case i installed version 10.1.1

[email protected]

and I was able to advance to the next problem... ;-)

Upvotes: 2

Related Questions