在2个月前项目是能正常打包的,到现在也没有改动什么,突然打包就报错了,现在serve启动能成功启动但是打包就会报错,报错如下:
ERROR Failed to compile with 1 error 下午5:00:21
error in ./src/App.vue?vue&type=style&index=0&lang=scss&
Syntax Error: ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema.
-
options has an unknown property 'data'. These properties are valid:
object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }@ ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/h5-vue-style-loader??ref--9-oneOf-1-0!./node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!./node_modules/@dcloudio/vue-cl
i-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--9-oneOf-1-2!./node_modules/postcss-loader/src??ref--9-oneOf-1-
3!./node_modules/postcss-loader/src??ref--9-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--9-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-p
reprocess-loader??ref--9-oneOf-1-6!./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!./node_module
s/@dcloudio/vue-cli-plugin-uni/packages/wrap-loader??ref--18!./src/App.vue?vue&type=style&index=0&lang=scss& 4:14-954
@ ./src/App.vue?vue&type=style&index=0&lang=scss&
@ ./src/App.vue
@ ./src/main.js
@ multi ./src/main.js
1***@qq.com
有用!
2022-01-06 09:28
越王够贱
sass版本要多少
2022-01-19 08:58
越王够贱
2022-01-19 08:58
2***@qq.com
特意感谢!已解决!
2022-03-15 17:42
波吉
牛啊,这个可以,把之前的sass-loader包卸载一下,然后 npm install sass-loader@8.x -D 就可以了
2023-11-07 16:44