csstools / postcss-normalize

Use the parts of normalize.css (or sanitize.css) you need from your browserslist
Creative Commons Zero v1.0 Universal
816 stars 40 forks source link

_autoprefixerPrefix error with postcss 6 #13

Closed shrpne closed 7 years ago

shrpne commented 7 years ago

Cannot read property '_autoprefixerPrefix' of undefined This error occurs with postcss v6. With postcss v5 everything works fine.

jonathantneal commented 7 years ago

Version 2 now supports PostCSS 6. Would you try again?

shrpne commented 7 years ago

Seems it is still not fixed for me. I updated package.json, deleted npm, reinstalled modules and error still exists. (There was deprecation warning about Node.raws it was fixed after update)

I use Node v7 if it matters

jonathantneal commented 7 years ago

Thanks for the update. I’m wondering if it’s another plugin in your stack. What other plugins are you using? I only ask because this project does not use Autoprefixer, and your error indicates something with Autoprefixer.

shrpne commented 7 years ago

I'm using only postcss-normalize and autoprefixer. I made a little test. It is strange, but everything works fine, if normalize goes after autoprefixer. But if normalize goes first, error occurs. Like this:

.pipe(postcss([
    postcssNormalize(),
    autoprefixer()
]))
ai commented 7 years ago

I have same issue. Seems like AST is broken after postcss-normalize. Maybe jsonToAst have issues?

jonathantneal commented 7 years ago

Testing this now.

ai commented 7 years ago

@jonathantneal what I should test? master?

jonathantneal commented 7 years ago

This should be resoled in 2.0.1.

Test: https://github.com/jonathantneal/postcss-tests/blob/master/postcss-normalize-test-00

Test Plugins: https://github.com/jonathantneal/postcss-tests/blob/master/postcss-normalize-test-00/test.js#L8-L9

ai commented 7 years ago

Thanks for fast fix, everything works now