-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
NODE_PATH not recognized when cap_net_bind_service is set #22648
Comments
FWIW setting |
Of course, but it doesn't explain why this behavior changed. |
I suspect #18511 -- Note that after that PR |
@richardlau Does that make this not-a-bug in your view? |
@Trott I think so? I'm not really familiar with It is a change in behaviour though, and perhaps it could have been better communicated. #23770 documented a different environment variable ( |
Closing. PR to update docs would be welcome. Feel free to comment (or re-open if GitHub lets you) if you feel like I'm closing this before its time. |
I recently upgraded my Node.js version from v9.6.1 to v10.9.0, and the behavior related to the capability cap_net_bind_service has changed.
Up until the v9.6.1 version, i have always set the net_bind_service capability to be able to load my service on ports 80 and 443 on my development machine. It has always worked as expected.
With v10.9.0, it prevents the NODE_PATH env variable to be used to set a different require path.
Full commands to replicate the behavior (v9.6.1):
Here, with the version v9.6.1,
/home/louis/tmp/node/node-v9.6.1-linux-x64/lib
is correctly set in the require pathsNow the same steps with the v10.9.0:
In this last example, you can see that
/home/louis/tmp/node/node-v9.6.1-linux-x64/lib
has disapeared.However, without the setcap command, NODE_PATH works as expected with v10.9.0.
I will now use Node.js without the bind capability (port >1024), but I think this is a regression.
The text was updated successfully, but these errors were encountered: