Js-ipfs: about example ipfs-101

Created on 2 Sep 2017  路  7Comments  路  Source: ipfs/js-ipfs

  • Version: 0.25.4
  • Platform: macOS X
  • Subsystem:

Type: Question

Severity: medium

Description:

I operated the ipfs-101 by the tutorials, but when I key npm install ipfs async , the error appear
image

Steps to reproduce the error:

P3 dieasy kinbug

All 7 comments

Looks like that is a new npm feature. more info here: http://thisdavej.com/node-newbie-error-npm-refusing-to-install-package-as-a-dependency-of-itself/

Try doing npm init inside that folder and check if it works. If that is the case, I'll add a package.json to the example.

yes! I can npm install ipfs async after npm init.
But when I run node 1.js, found that I can't cat the hello.txt
image
it has run about 10 mins, but nothing appear.

@kappabooom my bad. Fixed in https://github.com/ipfs/js-ipfs/pull/982/files

Let me know if it works for you! :)

thanks! it work!!!

@diasdavid I have another question. In example ipfs-101, did I really put the file on the distributed web? because I can cat hello.txt on https://ipfs.io/ipfs/QmXgZAUWd8yo4tvjBETqzUy3wLx5YRzuDwUQnBwRGrAmAo.
but when I add another file to ipfs, I can't cat my new text on https://ipfs.io/ipfs/QmfLEdmhPkPexiQ5JxFiXwgY4MHCWXP2D4m5WoX8jvPdFo

yes, you really shared a file to the distributed web :) if this was the first, congratulations! 馃帀

When you add another file to IPFS, do you leave your node running? Remember, IPFS is not like Cloud Storage, it is a FileSystem that uses Content Addressing to find data on the network, but it doesn't replicate data automatically for you, you need to ensure there are copies accessible.

@diasdavid I am not sure that did I keep my node on,but I vim 1.js //stream.on('end', process.exit),so I think it is still on.

Was this page helpful?
0 / 5 - 0 ratings