ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.44k stars 1.25k forks source link

No "exports" main defined: ipfs and ipfs-core #4235

Closed ReggieRumsfeld closed 1 year ago

ReggieRumsfeld commented 1 year ago

const IPFS = require('ipfs')

import * as IPFS from 'ipfs-core'

Lead to "No "exports" main defined" error for bot packages.

welcome[bot] commented 1 year ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

Vilchynskyi commented 1 year ago

const IPFS = require('ipfs')

import * as IPFS from 'ipfs-core'

Lead to "No "exports" main defined" error for bot packages.

Same issue

achingbrain commented 1 year ago

These modules as ESM-only, you cannot require them, only import.

Please see: https://github.com/ipfs/js-ipfs/blob/master/docs/upgrading/v0.62-v0.63.md#esm