csstools / postcss-plugins

PostCSS Tools and Plugins
https://preset-env.cssdb.org/
MIT No Attribution
904 stars 71 forks source link

Addition of `postcss-opacity-percentage` breaks on node < 16 #218

Closed prarabdhb closed 2 years ago

prarabdhb commented 2 years ago

Reproduction link

No response

Bug description

With the addition of postcss-opacity-percentage in v7.3.0, the package cannot be installed on node versions < 16. This should either be released as a major upgrade, or should've been mentioned in the changelog as a breaking change.

Actual Behavior

No response

Expected Behavior

No response

Can you reproduce it with npx @csstools/csstools-cli <plugin-name> minimal-example.css?

No response

npx Output

No response

Extra config

No response

What plugin are you experiencing this issue on?

No response

Plugin version

7.3.0

What OS are you experiencing this on?

macOS

Node Version

14.18.1

Validations

Would you like to open a PR for this bug?

romainmenke commented 2 years ago

@prarabdhb Can you add a bit more info? Error output or something?

We have tests running in node 12 and 14 and these passed : https://github.com/csstools/postcss-plugins/actions/runs/1771534168

Mitsunee commented 2 years ago

Also having this issue in my fgo-tools repo when trying to upgrade postcss-preset-env:

$ yarn add -D postcss-preset-env@latest

yarn add v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
error postcss-opacity-percentage@1.1.1: The engine "node" is incompatible with this module. 
Expected version ">=16". Got "14.18.2"
error Found incompatible module.

I currently need to stay on either node12 or node14 as vercel does not yet support node16.

prarabdhb commented 2 years ago

@prarabdhb Can you add a bit more info? Error output or something?

We have tests running in node 12 and 14 and these passed : https://github.com/csstools/postcss-plugins/actions/runs/1771534168

Hey, sorry to miss out on the logs. Thanks to @Mitsunee , we also see the same output.

This is most likely because postcss-opacity-percentage expects node >= 16.

pzrq commented 2 years ago

I'll add that this is also affecting CRA / react-scripts downstream:

$ yarn add -D react-scripts@5.0.0
yarn add v1.22.17
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
error postcss-opacity-percentage@1.1.1: The engine "node" is incompatible with this module. Expected version ">=16". Got "14.18.2"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Antonio-Laguna commented 2 years ago

@pzrq for the time being, could you try adding this to your package.json?

"resolutions": {
  "postcss-preset-env": "7.2.3"
}
Antonio-Laguna commented 2 years ago

The new version of opacity percentage has been released, ideally getting rid of the lock, the resolves, and node_modules should bring the new dependency.

Could you verify?

@pzrq @prarabdhb @Mitsunee

Will upgrade and release 7.3.1 right after that

Mitsunee commented 2 years ago

Everything fine here on my end now, reran yarn add -D postcss-preset-env@latest and the upgrade finished without any errors

prarabdhb commented 2 years ago

Yes, everything works on our end as well. Thanks for the quick resolution!

pzrq commented 2 years ago

Could you verify?

@pzrq ...

@Antonio-Laguna Thank you for the fast release, I can confirm it's working for me now on node 14 👍🏼

Antonio-Laguna commented 2 years ago

This is finally released as 7.3.1 !

Thanks all for your patience and all of the information you shared here! ❤️