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.

Invalid PostCSS Plugin found at: plugins[0]

See original GitHub issue

v13 of this plugin won’t compile for me. Is there something different I need to do to import the plugin as of v13?

Failed to compile.

./src/assets/Index.css (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-4-1!./node_modules/react-scripts/node_modules/postcss-loader/src??postcss!./src/assets/Index.css)
TypeError: Invalid PostCSS Plugin found at: plugins[0]

(@/Users/dfalling/Code/ido/postcss.config.js)
    at Array.forEach (<anonymous>)

Node 10.18.0

postcss.config.js:

const postcssImport = require("postcss-import");

module.exports = {
  plugins: [
    postcssImport
  ],
};

package.json:

    "postcss": "8.1.4",
    "postcss-loader": "4.0.4",
    "postcss-import": "13.0.0",

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
AlexVipondcommented, Nov 4, 2020

In case anyone else hits this error, I was getting it because I forgot to update my global postcss-cli installation to 8.x

Updating postcss-cli cleared everything up 👍

1reaction
RyanZimcommented, Nov 3, 2020

Found it! The error message indicates it’s coming from ./node_modules/react-scripts/node_modules/postcss-loader, which means your build process isn’t using the version of postcss-loader you have in your package.json, it’s using the postcss-loader that react-scripts pulls in, which happens to be postcss-loader@3.0.0: https://github.com/facebook/create-react-app/blob/aec42e2cc05fe0799a3b73830b874757e9e3f561/packages/react-scripts/package.json#L69

To use postcss v8 plugins, you’ll either have to stop using react-scripts, or wait for react-scripts to upgrade their version of postcss-loader to be compatible with postcss v8. Of course, you can also downgrade to postcss-import v12, which uses postcss v8.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Invalid PostCSS Plugin found at: plugins[0]
css -o generated.css terminal throws an error TypeError: Invalid PostCSS Plugin found at: plugins[0] can anyone please help me to fix it. Thank ......
Read more >
TypeError: Invalid PostCSS Plugin found at: plugins[1] #2795
Describe the problem: I am following this Upgrade guide. After running npm install tailwindcss@latest postcss@latest autoprefixer@latest, ...
Read more >
Invalid PostCSS Plugin found – AutoPrefixer, ...
I recently encountered this error in my Terminal when working with TailwindCSS and attempting to build my final CSS file. Invalid PostCSS Plugin...
Read more >
postcss/postcss - Gitter
Next js asks to pass the plugins as a string in postcss-config.js ... I do that I get the error Module build failed:...
Read more >
TypeError: Invalid PostCSS Plugin found at: plugins[0] #360
IssueHunt = OSS Development ⚒ + Bounty Program . IssueHunt is an issue-based bounty platform for open source projects. Anyone can put a...
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