菜鸡
菜鸡
  • 发布:2019-09-02 17:53
  • 更新:2022-02-16 15:39
  • 阅读:7375

【报Bug-已解决】用vue-cli创建的uni-app项目几乎没任何改动在使用scss的时候报错

分类:uni-app

详细问题描述

报错

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):  
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):  
ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema.

见下图,几乎没改任何东西

项目编译不出来

2019-09-02 17:53 负责人:无 分享
已邀请:
j***@163.com

j***@163.com

node版本v14.x可用 npm install sass@1.26.5 sass-loader@8.0.2 -S

菜鸡

菜鸡 (作者)

2019-09-02

发现问题是由于直接

npm install sass-loader

安装的sass-loader版本过高的问题
现在把sass-loader降到 7.x 就行了

  • 4***@qq.com

    作者的node环境是什么版本的?我将sass-loader降到7.3.1版本后,报下列错误,我的node版本是:v10.19.0

    5 WARN A new version of sass-loader is available. Please upgrade for best experience.

    14:30:06.195 Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):

    14:30:06.216 ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):

    14:30:06.216 Error: Missing binding /Users/limingfang/Desktop/sky-nomp-app-ui/node_modules/node-sass/vendor/darwin-x64-57/binding.node

    14:30:06.229 Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 8.x

    14:30:06.230 Found bindings for the following environments:

    14:30:06.245 - OS X 64-bit with Node.js 10.x

    2020-07-08 14:31

1***@qq.com

1***@qq.com

问题解决啦吗 我也是一直报错,vue-cli 初始化的项目

7***@qq.com

7***@qq.com

。。。降了sass-loader 也没用

该问题目前已经被锁定, 无法添加新回复