ampproject / amp-toolbox

A collection of AMP tools making it easier to publish and host AMP pages.
Apache License 2.0
449 stars 243 forks source link

Error "[object Object] is not a PostCSS plugin" on updating optimizer to v2.8.1 #1242

Open ags1773 opened 3 years ago

ags1773 commented 3 years ago

On updating @ampproject/toolbox-optimizer to v2.8.1, I get the following error. Able to reproduce this on my colleagues' machines as well. v2.8.0 works fine

Error: [object Object] is not a PostCSS plugin
    at Processor.normalize (/Users/amogh/work/qt/thequint-malibu/node_modules/postcss/lib/processor.es6:130:15)
    at new Processor (/Users/amogh/work/qt/thequint-malibu/node_modules/postcss/lib/processor.es6:38:25)
    at postcss (/Users/amogh/work/qt/thequint-malibu/node_modules/postcss/lib/postcss.es6:34:10)
    at module.exports (/Users/amogh/work/qt/thequint-malibu/node_modules/cssnano-simple/src/index.js:54:10)
    at Processor.normalize (/Users/amogh/work/qt/thequint-malibu/node_modules/@ampproject/toolbox-optimizer/node_modules/postcss/lib/processor.js:40:13)
    at new Processor (/Users/amogh/work/qt/thequint-malibu/node_modules/@ampproject/toolbox-optimizer/node_modules/postcss/lib/processor.js:9:25)
    at postcss (/Users/amogh/work/qt/thequint-malibu/node_modules/@ampproject/toolbox-optimizer/node_modules/postcss/lib/postcss.js:25:10)
    at SeparateKeyframes.transform (/Users/amogh/work/qt/thequint-malibu/node_modules/@ampproject/toolbox-optimizer/lib/transformers/SeparateKeyframes.js:146:36)
    at DomTransformer.transformTree (/Users/amogh/work/qt/thequint-malibu/node_modules/@ampproject/toolbox-optimizer/lib/DomTransformer.js:184:25)
    at DomTransformer.transformHtml (/Users/amogh/work/qt/thequint-malibu/node_modules/@ampproject/toolbox-optimizer/lib/DomTransformer.js:168:5)
    at ampStoryPageHandler (/Users/amogh/work/qt/thequint-malibu/node_modules/@quintype/framework/server/amp/handlers/story-page.js:119:27)
sebastianbenz commented 3 years ago

Thanks for reporting! I have troubles reproducing this, have you maybe got a sample project?