Adds dubious fix for a possible error with loadTransform #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello @substack et al,
I have a issue that I don't totally understand and a fix that I don't totally understand either 😛. Perhaps by explaining the issue and showing the fix here someone can tell me what I've done wrong (or maybe what I've done right).
Here's the issue: I have an express app (let's call it B), that uses Browserify and the strictify plugin in a gulp task to bundle front-end JavaScript. Usually this works just fine. Then, for reasons I'd rather not get into, it made sense for B to be exported as a module into another express app (let's call it A), and used as middleware. (To make it's assets available, B has a postinstall script to run gulp.)
B has dependencies that are mostly non-overlapping with A's dependencies, except for underscore. As a result, running
npm install
on A puts underscore in A/node_modules and not in A/node_modules/B/node_modules.In this arrangement, running the B's gulp task results in this error:
After some trial and error, I discovered this change to module_deps, in addition to that adding
{basedir: __dirname}
as an option to my transform, like so:...prevents the error and seems to make everything work ok. (This change doesn't fail the tests, but of course that doesn't mean it's the correct thing to do.)
So here are my questions:
Thanks!