{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/190","repository_url":"https://api.github.com/repos/ipfs/js-ipfs-api","labels_url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/190/comments","events_url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/190/events","html_url":"https://github.com/ipfs/js-ipfs-api/issues/190","id":127498776,"number":190,"title":"Example no longer works","user":{"login":"area","id":311812,"avatar_url":"https://avatars.githubusercontent.com/u/311812?v=3","gravatar_id":"","url":"https://api.github.com/users/area","html_url":"https://github.com/area","followers_url":"https://api.github.com/users/area/followers","following_url":"https://api.github.com/users/area/following{/other_user}","gists_url":"https://api.github.com/users/area/gists{/gist_id}","starred_url":"https://api.github.com/users/area/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/area/subscriptions","organizations_url":"https://api.github.com/users/area/orgs","repos_url":"https://api.github.com/users/area/repos","events_url":"https://api.github.com/users/area/events{/privacy}","received_events_url":"https://api.github.com/users/area/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ipfs/js-ipfs-api/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-01-19T17:35:31Z","updated_at":"2016-02-03T11:35:26Z","closed_at":null,"body":"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:\r\n\r\n```\r\nUncaught Error: options.payload must be a string, a Buffer, or a Stream\r\nexports.contain.exports.reachTemplate.exports.assert.condition @ app.js:36055\r\ninternals.Client.request.onError @ app.js:47850\r\nrequestAPI @ app.js:37627add @ app.js:36985\r\nColonyJS.store @ app.js:29396\r\nColonyJS.makeProposal @ app.js:29314\r\n(anonymous function) @ app.js:29265\r\n```\r\n\r\nI 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 type `Buffer` using the code, but the `stream` that is returned that I see is of type `Duplexify`. 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.\r\n\r\nI 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 their `package.json`, and something has inadvertently implemented a breaking change, somewhere."},"comment":{"url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/comments/179178473","html_url":"https://github.com/ipfs/js-ipfs-api/issues/190#issuecomment-179178473","issue_url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/190","id":179178473,"user":{"login":"dignifiedquire","id":790842,"avatar_url":"https://avatars.githubusercontent.com/u/790842?v=3","gravatar_id":"","url":"https://api.github.com/users/dignifiedquire","html_url":"https://github.com/dignifiedquire","followers_url":"https://api.github.com/users/dignifiedquire/followers","following_url":"https://api.github.com/users/dignifiedquire/following{/other_user}","gists_url":"https://api.github.com/users/dignifiedquire/gists{/gist_id}","starred_url":"https://api.github.com/users/dignifiedquire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dignifiedquire/subscriptions","organizations_url":"https://api.github.com/users/dignifiedquire/orgs","repos_url":"https://api.github.com/users/dignifiedquire/repos","events_url":"https://api.github.com/users/dignifiedquire/events{/privacy}","received_events_url":"https://api.github.com/users/dignifiedquire/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T11:35:26Z","updated_at":"2016-02-03T11:35:26Z","body":"I talked to @diasdavid and the next action points are:\r\n\r\n1. Run all tests through browserify as well as through webpack\r\n2. Setup examples for using js-ipfs-api with webpack and browserify and have them run on CI so we are sure they are up to date and working."}}