Syntax Error: ValidationError: Invalid options object. Stylus Loader has been initialized using an

比眉伴天荒 2023-01-01 13:52 265阅读 0赞

报错信息如下:

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

原因是安装的stylus是最新版本的,网上的信息说换一个版本就可以解决。于是乎安装下面的版本

  1. npm install stylus-loader@3.0.2

发表评论

表情:
评论列表 (有 0 条评论,265人围观)

还没有评论,来说两句吧...

相关阅读