TypeError: this.getOptions is not a function

When we install sass-loader node-sass, we always report a lot of errors.

After my continuous testing, I found that the version of these two plug-ins is actually too high. So simply sum up and only need to reduce the version. No need to uninstall the previous version again, just modify package.json:

"devDependencies": {
    
    
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0", 
    "node-sass": "^4.0.0",  //修改为4.0  直接在你的json后面添加即可
    "sass-loader": "^7.0.0"//修改为 7.0 直接在你的json后面添加即可
  },

The most important step of the idea is not to directly npm install requires cnpm install, otherwise it will not succeed. I don’t know why! ! !

Guess you like

Origin blog.csdn.net/qq_45557681/article/details/114885766