-
Notifications
You must be signed in to change notification settings - Fork 26
Quibble messes up require core modules/dependencies with same name #22
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
Comments
Reproducible with [email protected] + node 8.9.1 |
Thanks for this report. Any chance you could try adding a failing test or example to the build? I'm not likely to have time this week to get to this issue |
I am 90% sure this is a regression introduced by #18 Chewing on this now. |
I'm having a really hard isolating this into a test case in the repo, because for whatever reason I can't reproduce it when quibble is a symlinked dependency, only when it's actually installed in |
I will say one thing, which is that this appears to be a bug in the node-resolve package. Given a similar setup to what you described, notice that it works fine for
|
Opened browserify/resolve#147 |
As this is not moving on browserify, could you revert the changes, and eventually re-release them as a new minor version of quibble? |
Heads up that I've submitted a fix to browserify/resolve as of today. Let's see where that goes browserify/resolve#148 |
This is finally fixed in [email protected] -- thanks for being patient! |
Looks like
quibble.absolutify()
is not careful enough to correctly handle core modules that happen to have the same name as installed dependencies.For instance, tests of my suite broke because I'm using
util
core module and one of my dependencies loadsutil
polyfill in node_modules (viarequire('util/')
) beforehand.Quibble
fakeLoad()
is first called with"util/", [Module], false
and it correctlyresolves it to
/node_modules/util/util.js
. ThenfakeLoad()
gets called with"util", [Module], false
but instead of recognising it as a core module, it resolves it to/node_modules/util/util.js
again.As I'm using
util.promisify
(not available in the polyfill) my tests break as my code ends up consuming the poyfill instead of the node core module.The text was updated successfully, but these errors were encountered: