umicro / uView2.0

uView UI,是全面兼容nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
MIT License
1.56k stars 466 forks source link

导入uview2.0报错 #677

Open xuanInitial opened 2 years ago

xuanInitial commented 2 years ago

版本

2.0.33

转载链接

www.uviewui.com

重现步骤

1、新建项目用过uni-ui
2、通过npm导入uview 3、按照官网配置 4、在index.vue 编写 https://www.uviewui.com/components/quickstart.html 快速上手的代码 5.报错如下: Failed to compile.

/Users/initial/Desktop/HBuilderProjects/HBhydrological/node_modules/uview-ui/components/u-loading-icon/u-loading-icon.vue?vue&type=style&index=0&id=8ae91632&lang=scss&scoped=true& (./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-scoped-loader!/Users/initial/Desktop/HBuilderProjects/HBhydrological/node_modules/uview-ui/components/u-loading-icon/u-loading-icon.vue?vue&type=style&index=0&id=8ae91632&lang=scss&scoped=true&) Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js): SassError: Undefined variable: "$u-content-color". on line 244 of /Users/initial/Desktop/HBuilderProjects/HBhydrological/node_modules/uview-ui/components/u-loading-icon/u-loading-icon.vue

$u-loading-icon-text-color:$u-content-color !default;

期望的结果是什么?

可以正常运行

实际的结果是什么?

报错

ChenLiuPng commented 2 years ago

可能是sass安装出了问题

clippers1 commented 2 years ago

miss sass-loader

duolalu commented 1 year ago

遇到同样的问题 请问解决了吗

FanKeYuanDSA commented 11 months ago

copy theme.scss content into uni.scss

Caffeine19 commented 4 months ago

+1,应该安装sass还是node-sass,安装的版本应该是多少