Docz: Your current PostCSS version is 6.0.23, but autoprefixer uses 7.0.17

Created on 11 Aug 2019  路  11Comments  路  Source: doczjs/docz

Bug Report

I systematically get this error after running yarn docz dev, and right after Gatsby bootstrapping finished.

I'm using docz 2.0.0-rc.1 tried with both React/React DOM 16.9.0 and 16.8.6

Unknown error from PostCSS plugin. Your current PostCSS version is 6.0.23, but autoprefixer uses 7.0.17. Perhaps this is the source of the error below.

Happens on a fresh install of a react app with create-react-app.

Environment
macOS Mojave
Node v10.16.0

Thanks!

bug stale v2

Most helpful comment

same issue here

All 11 comments

same issue here

Gatsby is using very old [email protected] dep wich conflitcs with react-scripts.

$ npm ls postcss

+-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | | `-- [email protected]  deduped
| |   | `-- [email protected]
| |   |   `-- [email protected]  deduped
| |   `-- [email protected]  deduped
| +-- [email protected]
| | `-- [email protected]  deduped
| `-- [email protected]
|   `-- [email protected]  deduped

anyone know how to fix it?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hi, the same issue here:
MacOS 10.13.6
Node v10.16.2

Unknown error from PostCSS plugin. Your current PostCSS version is 6.0.23, but autoprefixer uses 7.0.23.

Look at the the answer. You should update your PostCSS by installing gatsby-plugin-postcss and add that in plugin. after that in postcss.config.js add these lines

const postcssPresetEnv = require(`postcss-preset-env`)

module.exports = () => ({
  plugins: [
    postcssPresetEnv({
      stage: 0,
    }),
  ],
})

look at the answer. install the gatsby-plugin-postcss and add the plugin. then in postcss.config.js type

const postcssPresetEnv = require(`postcss-preset-env`)

module.exports = () => ({
  plugins: [
    postcssPresetEnv({
      stage: 0,
    }),
  ],
})

@nazarimohamad I got this issue in my project using webpack, so basically i've install the postcss-preset-env and then update my postcss.config.js.

from:

module.exports = {
  plugins: {
    'rucksack-css': {},
    lost: {},
    autoprefixer: {},
    cssnano: {},
  },
};

to:

const postcssPresetEnv = require(`postcss-preset-env`);

module.exports = () => ({
  plugins: [
    postcssPresetEnv({
      stage: 0,
    }),
  ],
});

It's working. Hope it helps anybody :)

Thanks @jpcmf that fixed it for me 馃憤

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

regrettably picture regrettably  路  3Comments

capaj picture capaj  路  3Comments

w0wka91 picture w0wka91  路  3Comments

danburzo picture danburzo  路  3Comments

albinekb picture albinekb  路  3Comments