error in ./src/views/Login.vue Module build failed: TypeError: this.getOptions is not a function
errorin ./src/views/Login.vueModule build failed: TypeError: this.getOptions is not a function
·
错误产生环境
启动vue 项目时产生
错误描述
Module build failed: TypeError: this.getOptions is not a function
at Object.loader (G:\狂\VueStudy\hello-vue\node_modules\_sass-loader@12.4.0@sass-loader\dist\index.js:25:24)
@ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-26084dc2","scoped":true,"hasInlineConfig":false}!./node_modules/_sass-loader@12.4.0@sass-loader/dist/cjs.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/views/Login.vue 4:14-390 13:3-17:5 14:22-398
@ ./src/views/Login.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
错误原因
sass-loader
的版本太高了,需要降下来。
解决办法
1.在package.json 文件中修改sass-loader
的版本
"sass-loader": "^7.3.1",
2.由于修改了package.json 文件,我们需要重写下载依赖
npm install
3.启动
npm run dev
更多推荐
已为社区贡献4条内容
所有评论(0)