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

ipfs add example failure #36

Closed
danoctavian opened this issue Jul 19, 2015 · 7 comments
Closed

ipfs add example failure #36

danoctavian opened this issue Jul 19, 2015 · 7 comments

Comments

@danoctavian
Copy link

for example:

https://github.com/ipfs/node-ipfs-api/blob/master/examples/add.js

i am getting this error trace:

path.js:439
throw new TypeError('Arguments to path.resolve must be strings');
^
TypeError: Arguments to path.resolve must be strings
at Object.posix.resolve (path.js:439:13)
at Object.posix.relative (path.js:505:16)
at addFile (/home/dan/node_modules/ipfs-api/multipartdir.js:56:23)
at MultipartDir (/home/dan/node_modules/ipfs-api/multipartdir.js:14:5)
at getFileStream (/home/dan/node_modules/ipfs-api/index.js:151:12)
at send (/home/dan/node_modules/ipfs-api/index.js:47:16)
at Object.add (/home/dan/node_modules/ipfs-api/index.js:170:14)
at Object. (/home/dan/repos/haskell-ipfs-api/playground/contact_ipfs.js:15:6)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)

@jbenet
Copy link
Contributor

jbenet commented Jul 19, 2015

maybe similar to #34 ?

@danoctavian
Copy link
Author

perhaps.

i was trying to write a ipfs rest API implementation for haskell

https://github.com/danoctavian/haskell-ipfs-api

and i got stuck on the add command because i don't understand the http request requirements. i was using this node implementation as a reference.

Is there a better reference implementation at this point? or i'm better off just reading go-ipfs code and see what it expects?

@jbenet
Copy link
Contributor

jbenet commented Jul 20, 2015

@danoctavian i think inspecting the HTTP traffic of go-ipfs will be the best way. ngrok2 does this really nicely.

@danoctavian
Copy link
Author

@jbenet cool, ty

@krl
Copy link
Contributor

krl commented Jul 22, 2015

Add is not behaving properly across node and browsers, i'm going to write some tests to make sure we get this right in the coming days.

@daviddias
Copy link
Contributor

Is this still a problem? @krl ?

@krl
Copy link
Contributor

krl commented Aug 6, 2015

nope, seems to work again

@krl krl closed this as completed Aug 6, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants