ipld / js-ipld-block

Implementation of the Block data structure in JavaScript.
MIT License
13 stars 16 forks source link

fix require error #22

Closed mmalmi closed 7 years ago

mmalmi commented 7 years ago

Before: "Error: Cannot find module 'async/setImmediate'"

dignifiedquire commented 7 years ago

What OS are you on? We can't switch this, as this means that all of async would be loaded in the browser instead of a single file.

mmalmi commented 7 years ago

Tested on Node.js v6.9.2, OS X El Capitan & Ubuntu 12.04.

This occurred when using ipfs-api 12.1.0 as a dependency in another project.

daviddias commented 7 years ago

Is it specifically this line?

victorb commented 7 years ago

@diasdavid there is no reason for async/setImmediate to not work, unless you don't already have async installed. Repository is using async in runtime code, but it's included in devDeps instead of deps. This PR fixes that: https://github.com/ipfs/js-ipfs-block/pull/23

I came across the very same issue myself.

mmalmi commented 7 years ago

Fixed by #23