my-project@0.1.0 dev:mp-weixin: `cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-serv

BUG重现:

 ERROR  Failed to compile with 1 error                                                                       下午4:52:42

 error  in ./src/pages/index/index2.vue?vue&type=style&index=0&lang=scss&

TypeError: this.getOptions is not a function


 @ ./src/pages/index/index2.vue?vue&type=style&index=0&lang=scss& 1:0-840 1:856-859 1:861-1698 1:861-1698
 @ ./src/pages/index/index2.vue
 @ ./src/main.js?{"page":"pages%2Findex%2Findex2"}

 ERROR  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-project@0.1.0 dev:mp-weixin: `cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-project@0.1.0 dev:mp-weixin script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\MECHREV\AppData\Roaming\npm-cache\_logs\2021-03-02T08_52_42_319Z-debug.log

问题分析:由于sass和sass-loader版本过高或版本不相符导致不兼容,
解决方案:输入以下命令即可解决

npm i node-sass@4.14.1 sass-loader@7.3.1
  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值