alphagov / govuk-prototype-kit

Rapidly create HTML prototypes of GOV.UK services
https://prototype-kit.service.gov.uk
MIT License
303 stars 236 forks source link

Fix issues creating prototypes when using npm v10.4.0 or newer by removing dependency on zlib #2404

Closed joelanman closed 5 months ago

joelanman commented 5 months ago

the kit had a dependency of zlib 1.0.5 - this is 13 years old, and is replaced by the built in zlib in node itself

this should fix this issue that users have reported:

https://github.com/kkaefer/DEPRECATED-node-zlib/issues/14

fixes #2405

oscarduignan commented 5 months ago

just adding a comment here for people if they need a work around, assuming you're using a version of npm (and that's npm, not, nodejs - the versioning is different) greater than 8.3.0 (which introduced overrides) then you can exclude zlib by adding this into your package.json and trying running npm install again:

"overrides": {
  "zlib": "./_EXCLUDED_"
}
joelanman commented 5 months ago

@oscarduignan thanks! I've updated my template repo, as the npx command will fail:

https://github.com/joelanman/govuk-prototype-kit-prototype

joelanman commented 5 months ago

@36degrees cheers, happy for you to edit any of it!