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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM