Open xuanInitial opened 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;
可以正常运行
报错
可能是sass安装出了问题
miss sass-loader
遇到同样的问题 请问解决了吗
copy theme.scss content into uni.scss
+1,应该安装sass还是node-sass,安装的版本应该是多少
版本
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
期望的结果是什么?
可以正常运行
实际的结果是什么?
报错