csstools / postcss-preset-env

Convert modern CSS into something browsers understand
https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
Creative Commons Zero v1.0 Universal
2.22k stars 90 forks source link

upgrading to postcss-preset-env v7.0.0 from v6.7.0 causes build to hang. unable to build #223

Closed kimbaudi closed 2 years ago

kimbaudi commented 2 years ago

For a vue2 project, I tried to upgrade postcss-preset-env from v6.7.0 to v.7.0.0, but running yarn install just hangs. I have a minimal reproducible repo at https://github.com/kimbaudi/practice-vue2. To reproduce the issue:

yarn build hangs. seems to be an issue with postcss-preset-env v7.0.0. Need to downgrade to v6.7.0.

also, yarn start hangs as well.

renchap commented 2 years ago

I am seeing a similar issue with a Webpack / React project. Webpack build hangs with the node process at 100% CPU.

If I disable postcss-preset-env, the build finishes correctly. If I downgrade to v6.7.0, it builds correctly as well.

I am not sure on how to troubleshoot this, I think this is caused by a specific plugin but I dont really know how to find out which one.

Antonio-Laguna commented 2 years ago

Hi @kimbaudi I can reproduce your issue. I'm investigating

Antonio-Laguna commented 2 years ago

@renchap do you have a small repro? Right now @romainmenke identified some issues with vuetify so would love to cover more areas

benbender commented 2 years ago

@Antonio-Laguna I'm experiencing hanging builds on nextjs too.

Antonio-Laguna commented 2 years ago

@benbender I see, we've identified an issue with double gradients here: https://github.com/csstools/postcss-double-position-gradients/pull/5 without knowing anything else from other projects I can't promise it'll solve your specific issue.

benbender commented 2 years ago

@Antonio-Laguna You seem to be right:

"postcss-preset-env": {
        "features": {
          "double-position-gradients": false
        }
      }

Fixes the build. Thank you!

Antonio-Laguna commented 2 years ago

Thanks so much for testing this! This makes me hopeful that once we get to fix that plugin we'll get rid of the issue

renchap commented 2 years ago

@Antonio-Laguna I can confirm that disabling double-position-gradients fixes my build as well!

Antonio-Laguna commented 2 years ago

Double awesome!! @renchap ! Thanks all for your switf help here. We have a fix ready but will probably land tomorrow

benbender commented 2 years ago

the thanks are due to you and the fine people who revitalized this very useful project! 🥳
I'm glad if I'm able to help :)

kimbaudi commented 2 years ago

I can also confirm that disabling double-position-gradients fixes my build. Thank you! I'm not sure if I should close this issue or keep it open until the issue w/ double-position-gradients is resolved. 🤷

Antonio-Laguna commented 2 years ago

@kimbaudi let's keep it open till we get it released :) thanks for testing it you too!

Antonio-Laguna commented 2 years ago

@benbender @kimbaudi @renchap we've just published a new version (7.0.1) that renders the disabling of the plugin unnecessary anymore. Thanks for your patience and your information.

mker-sbab commented 2 years ago

@Antonio-Laguna Still have this issue in 7.0.1. Still need to keep "double-position-gradients": false for the build to go through

Antonio-Laguna commented 2 years ago

@mkersb could you check your package-lock and tell me your version of the double-position-gradients plugin?

mker-sbab commented 2 years ago

@Antonio-Laguna postcss-double-position-gradients "^3.0.1"

Antonio-Laguna commented 2 years ago

@mkersb Can you update to 3.0.3 ? Check csstools/postcss-double-position-gradients#6 for more context

mker-sbab commented 2 years ago

@Antonio-Laguna Will do, thanks for the help