question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: true is not a PostCSS plugin

See original GitHub issue

True is not a PostCSS plugin

Describe the bug

When running yarn dev it returns the following error:

error - ./styles/index.css (./node_modules/next/node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/next/dist/compiled/postcss-loader??__nextjs_postcss!./styles/index.css)
Error: true is not a PostCSS plugin

I have tried using .json instead of .js, that did not resolve the issue. I am using typescript and this is a new bug. I have had the same configuration for tailwind.config.js and postcss.config.js in the root of my projects for months with no prior issues. I even eliminated all content from styles/index.css with the exception of the following:

@tailwind base;

@tailwind components;

@tailwind utilities;

To Reproduce

Install the following:

yarn add tailwindcss next@9.5.4-canary.20 react react-dom && yarn add -D postcss-preset-env autoprefixer @types/react @types/react-dom @types/node postcss-flexbugs-fixes stylelint stylelint-config-recommended typescript

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to ‘https://github.com/DopamineDriven/windy-city-next
  2. Click on ‘clone repository or download zip’
  3. ‘install dependencies’
  4. run yarn dev and the error will flag

Expected behavior

I expect it to run just as all of my other TS+Nextjs+Tailwindcss repos do, each using next 9.5.x (headless-wp-next-directory, asross-portfolio)

Screenshots

image

System information

  • OS: Windows
  • Browser (if applies): Brave, Chrome
  • Version of Next.js: 9.5.4-canary.20
  • Version of Node.js: 14.11.0

Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:21
  • Comments:20 (3 by maintainers)

github_iconTop GitHub Comments

165reactions
DopamineDrivencommented, Sep 20, 2020

Update: Determined the issue

autoprefixer@10.0.0 breaks next’s postcss loader on start

I rolled back to autoprefixer@9.8.6 and the issue was resolved

30reactions
dr5hncommented, Oct 5, 2020

UPDATE: I solved this issue by adding this to package.json 🎉

    "peerDependencies": {
        "postcss": "^8.0.0"
    },

SOURCE: https://github.com/postcss/autoprefixer/releases/tag/10.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: true is not a PostCSS plugin
I have an issue while building a project, this error keeps popping up: Warning: true is not a PostCSS plugin. This error was...
Read more >
PostCSS a not plugin 打包is jenkins打包发布问题跟踪Error
之前在develop平台上一个前台项目全自动构建都正常,昨天构建失败了_1671465600.
Read more >
Your current PostCSS version is 8.2.4, but postcss-import ...
Unknown error from PostCSS plugin. ... bootstrap'; import 'alpinejs'; // Import through JS and not CSS. import '@fortawesome/fontawesome-pro/js/all.min';.
Read more >
What is PostCSS? How to Use Plugins to Automate CSS ...
PostCSS provides a large ecosystem of plugins to perform different ... The "color-no-invalid-hex": true rules give an error in the terminal ...
Read more >
PostCSS API
Create a new Processor instance that will apply plugins as CSS processors. ... with postcss.decl() ), that node will not have a source...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found