Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Browserify Buffer is not defined  #964

Closed
@ondratra

Description

@ondratra

Hello,
I noticed on one of my project that current version of js-ipfs-http-client doesn't work in browser (using Browserify). The same error happens when I try to load example browserify project from https://github.com/ipfs/js-ipfs-http-client/tree/master/examples/bundle-browserify . After page load I get this error

bundle.js:26254 Uncaught ReferenceError: Buffer is not defined
    at Object.191../utils/default-config (bundle.js:26254)
    at o (bundle.js:1)
    at bundle.js:1
    at Object.<anonymous> (bundle.js:5)
    at Object.1.buffer (bundle.js:40)
    at o (bundle.js:1)
    at r (bundle.js:1)
    at bundle.js:1

That happens on this line

Object.assign(module.exports, { isIPFS, Buffer, CID, multiaddr, multibase, multicodec, multihash, PeerId, PeerInfo })

When I tried to include buffer package manually to the project it had no effect. Does anybody know what is wrong?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions