RangerMauve / js-ipfs-fetch

Use the same `fetch()` API browsers provide for HTTP, but for IPFS
https://youtu.be/kI9Issf3MNc?t=1606
MIT License
65 stars 8 forks source link

Cannot find module 'ipfs' #14

Closed FloUz-ai closed 2 years ago

FloUz-ai commented 2 years ago

I seems there is some missing dependancies.. : Cannot find module 'ipfs'

It doesn not work neithe when I download the ipfs package

RangerMauve commented 2 years ago

Oh dang, the README hasn't been updated in a while.

It should instead look like

const IPFS = require('ipfs-core')
const makeIpfsFetch = require('ipfs-fetch')

const ipfs = await IPFS.create()
const fetch = await makeIpfsFetch({ipfs})

I'll update it in a sec.