Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http://esm.sh/balance-crypto not working #65

Closed
talentlessguy opened this issue May 17, 2021 · 3 comments
Closed

http://esm.sh/balance-crypto not working #65

talentlessguy opened this issue May 17, 2021 · 3 comments

Comments

@talentlessguy
Copy link
Contributor

URL: http://esm.sh/balance-crypto

Error:

/* esm.sh - error */
throw new Error("[esm.sh] " + "esbuild: No matching export in \"esm-build-5fbe66019deed45c715a316fc79902565cb5c540/node_modules/balance-crypto/dist/index.js\" for import \"default\"");
export default null;

Module dist/index.js file is an ESM file with one named export.

https://npmfs.com/package/balance-crypto/0.2.6/dist/index.js#L456

why would it break on no default export?

@ije
Copy link
Member

ije commented May 18, 2021

thanks, i will look into it

@jaydenseric
Copy link

Same issue for a bunch of packages, for example:

https://esm.sh/graphql-react@15.0.0

/* esm.sh - error */
throw new Error("[esm.sh] " + "esbuild: No matching export in \"esm-build-e616b5bc91d2d0be6c7e786ef2e81693615bfe0f/node_modules/graphql-react/public/index.mjs\" for import \"default\"");
export default null;

It's figuring out the right root module using package.json exports field:

https://github.com/jaydenseric/graphql-react/blob/v15.0.0/package.json#L37

But I don't know why it's attempting to make a default import from that file, since there is none:

https://unpkg.com/browse/graphql-react@15.0.0/public/index.mjs

@ije
Copy link
Member

ije commented Aug 7, 2021

fixed in v44 branch

@ije ije closed this as completed Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants