-
Notifications
You must be signed in to change notification settings - Fork 18
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
What is the "Could not redupe module ..." actually mean? #36
Comments
Browserify internally dedupes modules: if there are two identical files in the build, it will replace one of them with a stub that references the other. For tree shaking, this causes an issue, because the stub file does not appear to have any exports just by looking at the source. common-shakeify works around it by temporarily un-deduping the module, that is by replacing the stub with the original source. This "reduping" can fail if browserify has deduped a module, but the original source cannot be retrieved. Looking at the code I can see a potential cause of this … common-shakeify expects the original source to be earlier in browserify's build pipeline than the deduped stub module. If some plugin sorted the pipeline before common-shakeify gets to it, it's possible that the order is reversed. I think the only feasible way to work around it is by checking if you have multiple copies of |
Thanks. Now I understand more what browserify does under the hood.
Yes, I know there is. I can remove it by editing my code (it also might be a code cleanup) but I feel like it shouldn't be the way to go. I'll try this option anyway.
I can't imagine how this step fails. I might take a look at this process. It might be interesting to find out this actual cause. |
I agree. I basically thought it couldn't fail, which is why I didn't put much effort into the error message 😅 |
I received an error:
What does it mean? What should I do?
The text was updated successfully, but these errors were encountered: