TypeError: this.getOptions is not a function

Yesterday, when less replaced sass, it reported this error after installing node sass and sass loader

In short, there is a version conflict. The version of SASS loader is too high. I installed 11 and the last project was 10, so the solution is very simple

1.npm uninstall sass-loader       or       yarn remove sass-loader
2.npm install [email protected] -D     or       yarn add [email protected] -D

PS: my node sass version is 5.0.0, both of which are in the package     npm   i xx -D   , I came according to the last project. Different people have different opinions on the details. Just report no mistakes

Link to the original text: https://blog.csdn.net/qq_ 42430948/article/details/113552673

Read More: