gpt4 book ai didi

node.js - Sass Loader 错误 : Invalid options object. Stylus Loader 已使用与 API 架构不匹配的选项对象进行初始化

转载 作者:行者123 更新时间:2023-12-03 12:12:59 27 4
gpt4 key购买 nike

运行 npm run serve 后出现此错误:

in ./src/components/site-checker/insert-model.vue?vue&type=style&index=0&lang=stylus&

Syntax Error: ValidationError: Invalid options object. Stylus Loader has been initialized using an options object that does not match the API schema.
- options has an unknown property 'preferPathResolver'. These properties are valid:
object { stylusOptions?, sourceMap?, webpackImporter?, additionalData? }

我在这个框架中使用 VueJS:
[Vue 2] babel、路由器、vuex
Vue CLI v4.5.8

最佳答案

这是最近 stylus-loader 之间的兼容性问题的结果。和 vue-cli .最近是fixed在 Vue 的 dev 分支中。
目前最好的办法是降级stylus-loader到版本 3

npm install stylus-loader@3
您也可以尝试升级您的 vue-cli到最新版本:

npm update -g @vue/cli

OR

yarn global upgrade --latest @vue/cli

关于node.js - Sass Loader 错误 : Invalid options object. Stylus Loader 已使用与 API 架构不匹配的选项对象进行初始化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65265374/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com