【问题标题】:Getting Postcss warning without using it在不使用 Postcss 的情况下获得警告
【发布时间】:2022-01-05 04:52:24
【问题描述】:

我收到了这个 Postcss 警告:

You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js. (repeated 19 times)

但我没有使用它。这很烦人,因为如您所见,该消息重复了好几次。

我知道为什么会出现错误(我没有设置 Postcss 配置文件或任何插件、字符串化器等),但我不知道为什么首先安装 Postcss。

这是我的 package.json

{
  "name": "vip-english-website",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start"
  },
  "engines": {
    "node": "16.x"
  },
  "dependencies": {
    "@dzangolab/vue-accordion": "^1.2.0",
    "@nuxtjs/axios": "^5.13.6",
    "express": "^4.17.1",
    "googleapis": "^91.0.0",
    "vue-carousel": "^0.18.0",
    "vue-check-view": "^0.3.0",
    "vue-gapi": "^2.0.0",
    "vue-js-modal": "^2.0.1",
    "vuelidate": "^0.7.6"
  },
  "devDependencies": {
    "@nuxtjs/google-fonts": "^1.3.0",
    "core-js": "^3.19.1",
    "nuxt": "^2.15.8",
    "nuxt-windicss": "^2.0.12"
  }
}

有人知道吗?

【问题讨论】:

  • 把lib一个一个去掉,看看是哪个做的。

标签: npm postcss


【解决方案1】:

PostCSS 是 Nuxt 的一个依赖。您可以在项目目录下使用npm ls {package_name} 命令查看包依赖树。
问题已在最近的 PostCSS 版本中得到修复:https://github.com/postcss/postcss/issues/1375,但 Nuxt 可能只会在下一个大版本 (v3) 上更新它。

【讨论】:

    猜你喜欢
    • 2017-10-29
    • 1970-01-01
    • 2023-03-06
    • 2017-04-02
    • 1970-01-01
    • 2010-12-24
    • 2021-11-22
    • 2017-10-09
    相关资源
    最近更新 更多