-
-
Notifications
You must be signed in to change notification settings - Fork 185
resolve.sync doesn't respect NODE_PATH #39
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
Feels like it should be closed. Right? |
Not sure, no longer using |
still see the same inconsistency when using node-resolve 0.3.1, this affects sequelize-cli as can be seen in sequelize/cli#104 |
This issue breaks eslint_d per mantoni/eslint_d.js#36 |
Restoring consistency here between resolve.sync and require.resolve should be a matter of defaulting the "paths" option to require('module').globalPaths, right? |
I don't think that without this the package can make claims like:
@substack, a lot of people, including me, would be happy to fix this, as long as you or someone else will review and merge the PRs. |
#47 (comment) seems clear. @guncha you'll note that line in the readme links to the official node resolve algorithm, which by design omits all mention of NODE_PATH. If you file an issue on node's website, and they update that page, it'll be a much stronger case to add the behavior here. Using NODE_PATH is a really bad idea; and when node ships ES module support, it won't have any concept that enables requiring modules in a nonstandard place, so it's best to wean yourself off it asap. The proper solution right now is to pass Per the above comment and the OP, I'll close this for now. |
Alright, makes sense. I guess I read the "implements the node |
browserify doesn't implicitly set opts.paths to NODE_PATH anymore unlike stated previously in this documentation. For background see: * browserify/resolve#39 (comment) * browserify/resolve#47 * browserify/browserify#1626
browserify doesn't implicitly set opts.paths to NODE_PATH anymore unlike stated previously in this documentation. For background see: * browserify/resolve#39 (comment) * browserify/resolve#47 * browserify/browserify#1626
Due to browserify/resolve#39 browserify will ignore NODE_PATH on the command line. As this seems to be intended behavior, remove NODE_PATH from documentation.
Due to browserify/resolve#39 browserify will ignore NODE_PATH on the command line. As this seems to be intended behavior, remove NODE_PATH from documentation.
There is an inconsistency in how
resolve.sync
andrequire.resolve
resolve paths:The text was updated successfully, but these errors were encountered: