addyosmani / critical

Extract & Inline Critical-path CSS in HTML pages
Apache License 2.0
10.01k stars 372 forks source link

'punycode' is deprecated on node v.21 ERROR #590

Open giorgiopellegrino opened 6 months ago

giorgiopellegrino commented 6 months ago

Hi,

I turn to you to report a problem related to the dependency of the package 'punycode' used within the package 'critical'. I would like to inform you that 'punycode' is currently deprecated and this is causing problems during the build in the version of Node 21.

I tried to build the project using this configuration and found that using 'punycode' caused errors during the build process. At the same time, I consulted the Node documentation, which confirms that 'punycode' is actually deprecated. Screenshot 2024-03-25 173013 https://nodejs.org/dist/latest-v21.x/docs/api/punycode.html

Please consider this and update the punycode dependency in the 'critical' package. This will allow us to avoid build problems in our Luxottica projects. @gilbertococchi

Thank you in advance for your attention and for the prompt resolution of this problem.

Best regards,

Giorgio Pellegrino
Web Performance Consultant at Luxottica Group S.P.A.

bezoerb commented 6 months ago

Thanks for reporting the issue @giorgiopellegrino :) We will need to wait until this is resolved upstream:

image
giorgiopellegrino commented 6 months ago

Hi @bezoerb , Thank you for answering. Do you know if there is already an issue open on punycode GitHub?

jens-struct commented 1 week ago

It is fixed in punycode package, but this version is currently not used in all critical package dependencies.

You can work arround it for now by adding:

  "overrides": {
    "tough-cookie": "5.0.0"
  },

to your package.json.