-
Notifications
You must be signed in to change notification settings - Fork 299
Browserify integration is broken #190
Comments
What is the IPFS version you are currently running? |
I see this error with the browserified code as well. Tried with builds for 0.3.10, 0.3.11, 0.4.0-dev
|
I'm using IPFS 0.3.10 (installed from |
@ckeenan do you see it using our build - https://github.com/ipfs/js-ipfs-api/tree/master/dist ? @area could you try with 0.3.11? https://gobuilder.me/github.com/ipfs/go-ipfs/cmd/ipfs?branch=v0.3.11 |
@diasdavid I can include a dist file in <script > and that works fine. But trying to require a browserify-ed version of src does not |
@ckeenan our dist'ed version suffers some transformations, straight up browserify doesn't work anymore, to check what webpack uses/does, see https://github.com/ipfs/js-ipfs-api/blob/master/tasks/config.js |
Having variations of the same issue when using Browserify. Tried passing in a |
Having just gone through a |
@egasimus are you using the dist version or are you using a browserified version of |
@dignifiedquire I'm browserifying it myself. |
@dignifiedquire since we had written on the README that browserify is the 'go to' solution to use js-ipfs-api in the browser, we should either 1) remove it (if it is broken completely) and replace by documentation on how to use it with WebPack or 2) even better, make it work with browserify and Webpack and give examples for it (plus tests) |
i'd much prefer (2) o/ |
I talked to @diasdavid and the next action points are:
|
I figured out the issue why this is failing: |
Good to see progress on this. 👍 How do you plan to replace Vinyl? |
We've just released a new version (3.0.1) and also updated the installation docs, you should not encounter any more problem using this module with browserify. Let us know if it is working for you. |
Closing this one, as it should not be a problem anymore. Let us know if you still have an issue :) |
I have been using the example provided at https://github.com/ipfs/js-ipfs-api for a proof-of-concept, successfully communicating with an IPFS node hosted locally for the last week or so. Earlier today, I blew away my
node_modules
directory and reinstalled the relevant packages (i.e.js-ipfs-api
). The example now no longer works for me - I get an error in my console:I am aware that due to my use of
browserify
, these line numbers are not useful! Some investigation reveals, I believe, that something fishy is happening around https://github.com/ipfs/js-ipfs-api/blob/285a7e3746110c1fe843b938c026161856c36bcd/src/request-api.js#L83-L85 .files
is a typeBuffer
using the code, but thestream
that is returned that I see is of typeDuplexify
. I have not burrowed deep into the dependencies to figure out why this is happening, but it is this conversion that means that the check conducted by Wreck (https://github.com/hapijs/wreck/blob/238647bc9b45120457e35adb85061586b796e0a7/lib/index.js#L71-L73) fails, throwing the error.I will note with interest that using the wrapper for
js-ipfs-api
at https://github.com/ConsenSys/ipfs.js the example continues to work. I assume this is due to their precise versioning in theirpackage.json
, and something has inadvertently implemented a breaking change, somewhere.The text was updated successfully, but these errors were encountered: