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
plugin-commonjs: ReferenceError: commonjsHelpers is not defined #468
Comments
Well you're a major version behind. Unfortunately reproductions are required for us to triage issues. If they're truly a burden, that means you're asking people who donate their free time to take on your burden, and that's not really fair. Please let us know if/when you add a repro and we'll reopen. |
I wonder if this has something to do with the problem: plugins/packages/commonjs/src/transform.js Line 138 in 28f9869
@shellscape What package am I behind on? The latest version of I would love to open a reproduction. But I'm not familiar with the codebase, I don't understand the problem, so I have no idea how to open a reproduction. I'll do my best to come up with one, but I imagine that will require me to find the source of the bug first, and at that point I would just open a PR. Bug reports are a two-way street. You're asking a reporter to donate their time to write a good bug report, which isn't always easy, and the reporter is asking the maintainers to triage and help with the problem. When not enough information is known, like not being able to define a minimal reproduction, for example, being able to open an issue is still useful. It allows others to find the issue and understand that they're not the only ones with the problem, and it allows contributors who understand the codebase the chance to shed some light on possible causes. Even without repros I think allowing your users to open reports without friction is still valuable. Bug reporters are only trying to help the project improve, after all. |
Whoops, was looking at your node version.
No, they aren't. This has been bikeshed'd a million times in open source and the project has set its standard. Please, I beg of you not to argue this point. (also light reading If/when you're able to add a reproduction we'll happily dive in. Until then, the issue will remain closed but other users may comment. |
I have a working reproduction: https://repl.it/repls/AliceblueFluffyMicroprogramming#input.js After isolating the code that provokes the bug, I found that this was fixed the other day in |
Same symptom but after upgrade all roll up dep to latest it woks for me |
This was fixed in Rollup core via rollup/rollup#3643 |
How Do We Reproduce?
Not being able to open issues without a reproduction is a burden. I'm working on a proprietary codebase that I can't just copy-paste here. I don't know the exact scenario that is causing some, not all, of my produced bundles to contain a reference to a nested property of a non-existent global variable. I would like to at least be able to open an issue so that we can discuss and investigate the problem.
What I can tell you is that for the bundles that have this problem, and cannot be loaded in the browser, they all contain the exact same line of code:
If I alter the produced bundle to by changing the expression to remove this reference:
The bundle loads in the browser just fine and works as expected. Grepping through the bundles identifies the above line as the only reference to
commonjsHelpers
anywhere. There is novar commonjsHelpers =
or the like anywhere to be found. Am I missing some kind of external dependency that bundles made using this plugin expect to be loaded?Expected Behavior
Loading a Rollup bundle created using
@rollup/plugin-commonjs
should not cause reference errors.Actual Behavior
ReferenceError: commonjsHelpers is not defined
thrown in the console.The text was updated successfully, but these errors were encountered: