GithubHelp home page GithubHelp logo

ipfs.id is not a function about js-ipfsd-ctl HOT 4 CLOSED

ipfs avatar ipfs commented on May 30, 2024
ipfs.id is not a function

from js-ipfsd-ctl.

Comments (4)

daviddias avatar daviddias commented on May 30, 2024 1

Fixed with #165 :)

from js-ipfsd-ctl.

daviddias avatar daviddias commented on May 30, 2024

@Powersource that ipfs instance is not an ipfs-api instance. Log its methods, it is something that is created here that exposes some commands but not all. You want to do a disposableAPI or create a js-ipfs-api instance that connects to that daemon started.

from js-ipfsd-ctl.

Powersource avatar Powersource commented on May 30, 2024

Ok thanks, looked into the code a bit more and I think this should work (followed by using the Addr's to
connect using js-ipfs-api):

const ipfsd = require('ipfsd-ctl')

ipfsd.local((err, ipfs) => {
    if (err) { throw err }

    console.log(ipfs.apiAddr)
    console.log(ipfs.gatewayAddr)
});

Both of those log null. And I don't really understand the comment in the example linked above // opens an api connection to local running ipfs node.

from js-ipfsd-ctl.

Powersource avatar Powersource commented on May 30, 2024

Trying this with 0.23 it still doesn't seem to work. My code.

{"diskinfo":{"free_space":104992063488,"fstype":"61267","total_space":92177629184},"environment":{"GOPATH":"/home/me/prj/go","IPFS_PATH":""},"ipfs_commit":"f55a7a03b","ipfs_version":"0.4.11-dev","memory":{"swap":0,"virt":219328000},"net":{"interface_addresses":["/ip4/127.0.0.1","/ip4/10.2.253.37","/ip6/::1","/ip6/fe80::80ca:2835:20da:f537"],"online":false},"runtime":{"arch":"amd64","compiler":"gc","gomaxprocs":4,"numcpu":4,"numgoroutines":5,"os":"linux","version":"go1.9"}}

from js-ipfsd-ctl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.