Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Seeing a zlib error between browser nodes and node.js nodes? #758

Closed
@daviddias

Description

@daviddias

This is a known issue and we do have more than just a solution for it \o/

The problem is that the default shim for zlib that is available for webpack and browserify is simply incomplete, we've fixed this by upgrading that shim and implementing the remaining features, however, since the PR -- browserify/browserify-zlib#18 -- hasn't been merged for the course of almost a year, we have to shim it manually every time.

The complete zlib shim is available at: https://www.npmjs.com/package/browserify-zlib-next

Just add to your webpack config: zlib: 'browserify-zlib-next', or you can check an example on how to do it at: https://github.com/ipfs/js-ipfs/tree/master/examples

We are also working on getting this shim to be the default of both browserify and webpack, so that we don't have to wait for the PR above to be merged, see the developments here:

Metadata

Metadata

Labels

kind/bugA bug in existing code (including security flaws)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions