Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename npm package #7

Open
devongovett opened this issue Oct 22, 2011 · 6 comments
Open

Rename npm package #7

devongovett opened this issue Oct 22, 2011 · 6 comments

Comments

@devongovett
Copy link

Because Node 0.6 will have built in zlib support, calling require("zlib") to load this module no longer works since the built in version overrides the npm package. I use this module as a dependency to one of my own modules and will continue to do so for a little while yet for backwards compatibility reasons. However, my module is currently broken because because of the naming conflict with the built in version in 0.6 which uses a different API. It might be a good idea to rename this npm module to avoid this naming conflict. Thanks!

@springmeyer
Copy link

I forked and renamed to _zlib, and upgraded the wscript to work with node v6: https://github.com/springmeyer/node-zlib

@dmich
Copy link

dmich commented Dec 22, 2011

+1

3 similar comments
@bwindels
Copy link

+1

@gluxon
Copy link

gluxon commented Oct 6, 2012

+1

@azer
Copy link

azer commented Mar 3, 2013

+1

@rsp rsp mentioned this issue Sep 23, 2016
@JosephCastro
Copy link

The npm webpage, needs to be removed or changed to deprecated

36degrees added a commit to joelanman/govuk-prototype-kit that referenced this issue Apr 3, 2024
Creating new prototypes is (silently) failing when using npm v10.4.0 or newer because of an error that occurs when installing the `zlib` package:

```
$ npm install zlib
npm ERR! code 127
npm ERR! path /Users/oliver.byford/Code/zlib-test/node_modules/zlib
npm ERR! command failed
npm ERR! command sh -c node-waf clean || true; node-waf configure build
npm ERR! sh: node-waf: command not found
npm ERR! sh: node-waf: command not found
```

The `zlib` package is 13 years old, and has been replaced by a zlib ‘core module’ built into node itself since Node v0.6.

`require(‘zlib’)` will always return the core module [1] over a dependency from `node_modules`, and so despite being listed as a dependency the `zlib` package will never be used [2] and can safely be removed.

[1]: https://nodejs.org/api/modules.html#modules_all_together
[2]: kkaefer/DEPRECATED-node-zlib#7

Co-authored-by: Oliver Byford <oliver.byford@digital.cabinet-office.gov.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants