ipld / js-dag-cbor

dag-cbor codec for IPLD
Other
27 stars 17 forks source link

fix: add entry point to package.json #82

Closed pierre275 closed 1 year ago

pierre275 commented 1 year ago

This field is required to recognise library entry point in metro bundler

this change fixes this error

image
rvagg commented 1 year ago

@achingbrain can you weigh in here? As far as I'm concerned a "main" doesn't make sense for our ESM-only packages, it's time to upgrade toolchains to support ESM. Are you adding "main" back in any of your other packages to support this kind of thing?

BigLep commented 1 year ago

2023-02-21 maintainer conversation: we are only supporting ESM.
@rvagg is going to get confirmation from @achingbrain on whether a "main" is needed here.

achingbrain commented 1 year ago

No, all our modules use "exports" and not "main".

The error message above is:

the package ..../node_modules/@ipld/dag-pb/package.json was successfully found. However this package itself specifies a main module field that could not be resolved (..../node_modules/@ipld/dag-pb/index. Indeed, none of these files exist: ...

This is interesting as @ipld/dag-pb does not specify a main module field.

@pierre275 what is react native using to do the bundling on the dev server?

BigLep commented 1 year ago

Closing since haven't heard a response.