-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CommonJS import runtime issue since 0.14.21 #2239
Comments
Running the build script with
It turns out that |
Thank you very much for the hints!
So in theory, who should be "responsible" for solving it? ESBuild, |
Well ideally Browserify could just fix their bug: browserify/browserify#1994. I don't expect that to happen, however. They seem to be uninterested in fixing it. The problem is that (as far as I can tell) Browserify invented the I think in this particular case the fix should come from esbuild. I have attempted to reverse-engineer a specification by collecting a set of test cases here: https://github.com/evanw/package-json-browser-tests. It looks like this case you reported isn't represented in that test suite, and adding it does cause esbuild to fail (i.e. to fail when Browserify succeeds). I'll work on a fix. |
Hello 👋
Before I start, I would like to thank you for this amazing tool that ESBuild is, and more specifically the releases notes, that are always extremely educational and interesting to read, I love them!
So, I've been trying to debug a very weird issue that happens since I updated my version of ESBuild from
0.14.8
to0.14.38
. I've been able to pinpoint the faulty release:0.14.21
(0.14.20
is working fine).I am working with some old packages (I cannot upgrade this dependency as it's "consumer" is not really maintained anymore). I suspect the issue lies on the dependency
package.json
and how the module is resolved.I am very unsure of what is going on, so if I can help providing additional information, or if some of the information below is irrelevant, please tell me!
So, the issue:
level-js@4.0.2
"Uncaught TypeError: setImmediate2 is not a function"
Stack trace (going through the bundle):
It would seem
setImmediate2
is an empty object here, and not a function.So from here, we can see an import is trying to import itself? Which looks fishy to me.
Reproduction steps:
git clone https://github.com/martpie/museeks.git
cd museeks
yarn && yarn dev
yarn museeks:debug
(you may need to click on the app icon in your dock, as the logic is to show the window only when the app initiates successfully)view
menu, click on "Toggle Developer Tools" if they're not already openIf there's anything I can do to help debug this issue, please tell me! :)
The text was updated successfully, but these errors were encountered: