TypeError: this.getOptions is not a function 的解决

1. The emergence of the problem:

  1. During the reacttime of project development, the emergence of this error, TypeError: this.getOptions is not a functionas follows:

Insert picture description here

2. Problem analysis and solution:

  1. Analysis of the problem: This is actually less-loaderthe version is too high, it is not compatible getOptionsfunction method, so it is necessary to less-loaderdowngrade processing
  2. To solve the problem: The npm uninstall less-loadercommand to uninstall the original version less-loader, and then through the npm install [email protected]command to download the downgrade version less-loader, this problem can be solved

Guess you like

Origin blog.csdn.net/weixin_42614080/article/details/113749476