moduleNode exposes the apparently non-private variable module.paths, but there is no documentation about it on nodejs.org, not even to say that it is really private despite the naming convention (I don't know if this is the case).
Looking at git blame it looks like it was added in https://github.com/nodejs/node/commit/46513483cd96438f33a67fb870b784d1d1f55dd0 (by @isaacs in 2011).
I suspect this is an oversight. I'll mark this as a documentation request, and if people have strong opinions about not documenting it they can voice them here or in the PR.
For anyone looking to take this on, the first thing to read/follow is CONTRIBUTING.md, there's also a Style Guide that might be useful, although make lint lints the docs now, and following the style in that file is usually a good way to go.
The place to add module.paths documentation is here (in doc/api/modules.md).
I'd like to give it a try.
I'd like to give it a try.
Go for it, if you have any problems just ask here. Once you have something just raise a PR, if it's not finished put WIP in the title. That way people can give you feedback on your proposed change.
@gibfahn thx, there one question that the added Version is correct?
Has this issue been resolved?
@JaySeeCode Yes, in #14435. Sorry, I'll close this issue now.
@JaySeeCode #14435 is a good start, but if you have the time to research it a little bit, try expanding the description, maybe also add a reference to the resolve algorithm. The other fields could use some love also - https://github.com/nodejs/node/blob/master/doc/api/modules.md#modulepaths
Most helpful comment
Go for it, if you have any problems just ask here. Once you have something just raise a PR, if it's not finished put
WIPin the title. That way people can give you feedback on your proposed change.