RadValentin / postcss-prefix-selector

Prefix all CSS rules with a selector
MIT License
165 stars 16 forks source link

`Error: PostCSS plugin postcss-prefix-selector requires PostCSS 8.` #94

Closed sidoruk-sv closed 3 years ago

sidoruk-sv commented 3 years ago

Starting to get such error with a minor update to postcss-prefix-selector@1.11.0.

Interesting how that happened (see that in deps, there where postcss 8 for a long time already).

lllianreg commented 3 years ago

help me !!!

Uncaught Error: Module build failed (from ./node_modules/_svg-sprite-loader@6.0.9@svg-sprite-loader/lib/loader.js): Error: [object Object] is not a PostCSS plugin

node_modules_postcss@5.2.18@postcss\lib\processor.js:145:15 if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object' && Array.isArray(i.plugins)) { normalized = normalized.concat(i.plugins); } else if (typeof i === 'function') { normalized.push(i); } else if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object' && (i.parse || i.stringify)) { throw new Error('PostCSS syntaxes cannot be used as plugins. ' + 'Instead, please use one of the ' + 'syntax/parser/stringifier options as ' + 'outlined in your PostCSS ' + 'runner documentation.'); } else { // ERROR: i: { postcssPlugin: 'postcss-prefix-selector', Rule: [Function: Rule] } throw new Error(i + ' is not a PostCSS plugin'); }

An urgent fix is required. Thank you

RadValentin commented 3 years ago

@kshiw @sidoruk-sv Please try to npm install again. Version 1.11.0 contained a breaking change, I published a new version 1.12.0 that fixes this.

danielweck commented 3 years ago

Ah, maybe this will fix this: https://github.com/JetBrains/svg-sprite-loader/issues/469 ...checking

danielweck commented 3 years ago

I confirm that updating postcss-prefix-selector to the hotfix release 1.12.0 transitively fixes svg-sprite-loader. Phew! :) Thank you for addressing this regression bug quickly. See: https://github.com/JetBrains/svg-sprite-loader/issues/469

RadValentin commented 3 years ago

Looks like everything went back to normal so I'm closing this one. Thanks for reporting it!

sidoruk-sv commented 3 years ago

@RadValentin indeed, all is working now.

Thank you for lightning fast hotfix!)