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

TypeError: require_elliptic2(...) is not a function #1209

Closed
achingbrain opened this issue Apr 27, 2021 · 1 comment · Fixed by #1215
Closed

TypeError: require_elliptic2(...) is not a function #1209

achingbrain opened this issue Apr 27, 2021 · 1 comment · Fixed by #1215

Comments

@achingbrain
Copy link

When using the secp256k1 module this line seems to trip esbuild@0.11.15 up.

The problem seems to have appeared in esbuild@0.11.9 - that is, no error is present in esbuild@0.11.8.

Repro repo: https://github.com/achingbrain/esbuild-secp256k1

achingbrain added a commit to achingbrain/playwright-test that referenced this issue Apr 27, 2021
hugomrdias pushed a commit to hugomrdias/playwright-test that referenced this issue Apr 27, 2021
@evanw
Copy link
Owner

evanw commented Apr 27, 2021

Sorry about this. This is due to some changes in the interpretation of the browser field to try to accept some strange path remappings that are accepted by Browserify but not by other bundlers. I believe these strange remappings only work in Browserify due to a Browserify bug, but I'm still working on confirming this (browserify/browserify#1994). There is unfortunately no specification for the browser field (this is commonly referenced but does not have nearly enough detail to actually implement the feature) so I have been trying to periodically adjust esbuild's implementation as I become aware of new test cases. I thought the rule that Browserify was using was something like "strip all leading ./ before comparison" but clearly that's not the case either. I'll try to adjust esbuild's rules again to incorporate this test case too.

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

Successfully merging a pull request may close this issue.

2 participants