ipfs / js-ipfs-unixfs

JavaScript implementation of IPFS' unixfs (a Unix FileSystem representation on top of a MerkleDAG)
Other
87 stars 34 forks source link

Unable to use in React Native application, because package.json missing from exports #336

Open jasny opened 1 year ago

jasny commented 1 year ago

When trying to build a React Native application, we get the following warning

warn Package ipfs-unixfs-importer has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /home/arnold/Projects/ltonetwork/universal-wallet/node_modules/ipfs-unixfs-importer/package.json

This can be solved by adding an export to package.json

"exports": {
 ...
  "./package.json": "./package.json"
}
jasny commented 1 year ago

Other IPFS projects have similar issues. See https://github.com/ipfs/js-stores/issues/230

joshLong145 commented 1 month ago

Can also report this issues in Jest environments using NodeJs v20 and Jest version 27