Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

TypeError: IPFS is not a constructor #7

Open
milahu opened this issue Jan 3, 2022 · 0 comments
Open

TypeError: IPFS is not a constructor #7

milahu opened this issue Jan 3, 2022 · 0 comments

Comments

@milahu
Copy link

milahu commented Jan 3, 2022

expected: same api as js-ipfs

import * as IPFS from 'ipfs-http-client-lite';

//const ipfs = new IPFS({ /* options */ }); // TypeError: IPFS is not a constructor
//const ipfs = await IPFS.create({ /* options */ }); // TypeError: IPFS.create is not a function
const ipfs = IPFS({ /* options */ });
import * as IPFS from 'ipfs';
//import * as IPFS from 'ipfs-core';

const ipfs = await IPFS.create({ /* options */ });

edit: use new api of IPFS.create

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

1 participant