首页 > 移动平台 > 详细

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

时间:2021-04-01 18:47:54      阅读:159      评论:0      收藏:0      [点我收藏+]
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

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

原文:https://www.cnblogs.com/mizhifei/p/14606908.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!