browserify icon indicating copy to clipboard operation
browserify copied to clipboard

Browserify doesn't use $NODE_PATH to resolve transforms

Open greim opened this issue 9 years ago • 3 comments

This:

NODE_PATH=/some/path
browserify -t foo main.js > bundle.js

...fails when foo is resolved at /some/path. Also created a related PR here: https://github.com/substack/module-deps/pull/120 regarding cases where dependencies' transforms were failing to load for similar reasons.

greim avatar Sep 15 '16 22:09 greim

Just ran into the same issue. Thanks for the PR -- absent an integration into browserify, that code is handy to use in a custom patch, if necessary :)

cguinnup avatar Nov 18 '16 22:11 cguinnup

Just ran into the same issue here as well. Double-thanks for the PR. 🎉

damncabbage avatar Apr 23 '17 02:04 damncabbage

This seems to be caused by this issue: https://github.com/browserify/resolve/issues/39

Unfortunately it seems like this has been dubbed an intended behaviour although all documentation still states that NODE_PATH works. This is especially frustrating because it seems now that opts.paths can't be set from the command line.

sternenseemann avatar Jul 21 '20 17:07 sternenseemann