Skip to content

TypeError: this.api.start is not a function when type is 'proc' #466

@bluelovers

Description

@bluelovers
    "ipfs": "^0.41.1",
    "ipfsd-ctl": "^3.0.0"
(node:87572) UnhandledPromiseRejectionWarning: TypeError: this.api.id is not a function
    at Daemon.start (G:\Users\The Project\p2p\ws-ipfs\node_modules\ipfsd-ctl\src\ipfsd-daemon.js:222:31)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
import { createController } from 'ipfsd-ctl';

(async () => {
	let ipfsd = await createController({
		type: 'proc',
		ipfsModule: require('ipfs'),
		ipfsHttpModule: require('ipfs-http-client'),
		ipfsBin: require.resolve('ipfs/src/cli/bin.js'),
		ipfsOptions: {
			EXPERIMENTAL: {
				pubsub: true,
				ipnsPubsub: true,
				sharding: true,
				dht: true,
			},
			relay: {
				enabled: true,
				hop: {
					enabled: true
				}
			},
		},
		disposable: false,
	});


	await ipfsd.start();
	let ipfs = ipfsd.api;
	console.log(await ipfs.id())
})();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions