uni-app uView 集成遇到问题TypeError: this.getOptions is not a function

yarn add node-sass-D
yarn add sass-loader -D
yarn run dev:mp-weixin

yarn run v1.22.10
$ cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch
请注意运行模式下,因日志输出、sourcemap以及未压缩源码等原因,性能和包体积,均不及发行模式。若要正式发布,请点击发行菜单或使用cli发布命令进行发布
小程序各家浏览器内核及自定义组件实现机制存在差异,可能存在样式布局兼容问题,参考:https://uniapp.dcloud.io/matter?id=mp

\ 开始编译当前项目至 mp-weixin 平台...

ERROR Failed to compile with 1 error 下午4:08:02

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

TypeError: this.getOptions is not a function
at runMicrotasks (<anonymous>)


@ ./src/App.vue?vue&type=style&index=0&lang=scss& 1:0-783 1:799-802 1:804-1584 1:804-1584
@ ./src/App.vue
@ ./src/main.js

ERROR Build failed with errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


  出现以上问题,是因为sass-loader版本太高,重新安装低版本sass-loader即可(11以下的)

运行:

yarn add sass-loader@10.x -D

  安装后再运行不在提示

TypeError: this.getOptions is not a function

posted @ 2021-04-01 16:23  芬尼克斯  阅读(1827)  评论(0编辑  收藏  举报