node-sass和sass-loader版本冲突问题导致sass-loader报错

sass-loader报错:

ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schem
a.
 - options has an unknown property 'data'. These properties are valid:
  object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }

 

1、node-sass@5.0.0和sass-loader@10.1.1

 2.   "node-sass": "^4.14.1",
        "sass-loader": "^8.0.2",
  也有可能是node-sass、sass-loader与node版本相关的问题,可以尝试降低node版本
posted @ 2022-01-10 13:15  琳蕊奕  阅读(519)  评论(0编辑  收藏  举报