ValidationError:无效的选项对象。CSS Loader已使用与API模式不匹配的选项对象进行了初始化

@zeit/next-css用来将css文件导入到我的组件和页面文件中,但是却抛出了这个错误

./styles/navbar.css导入此css文件到我的navbar.jsin组件中,出现此错误

ValidationError: Invalid options object. CSS Loader has been initialised using
     an options object that does not match the API schema.
- options has an unknown property 'minimize'. These properties are valid:
   object { url?, import?, modules?, sourceMap?, importLoaders?, localsConvention?, onlyLocals? }

next.config.js放在哪里package.json

const withCSS = require("@zeit/next-css");
module.exports = withCSS();

我的包json

{
  "name": "transfer-to",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "@zeit/next-css": "^1.0.1",
    "isomorphic-unfetch": "^3.0.0",
    "next": "9.0.7",
    "react": "16.10.2",
    "react-dom": "16.10.2"
  }
}
Stafan神奇2020/03/24 17:29:57

为了临时解决您的问题,请从以下软件包中删除“ ^”符号:

"dependencies": {
    "@zeit/next-css": "1.0.1",
    "@zeit/next-sass": "1.0.1",
    "next": "9.0.2",
    "node-sass": "4.12.0"
    ...
  }

这些软件包的更新版本似乎有问题。