mirror of https://github.com/nodejs/node.git
doc: minor clarification in the modules API doc.
PR-URL: https://github.com/nodejs/io.js/pull/1983 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>pull/1983/head
parent
c207e8d223
commit
96165f9be2
|
@ -145,8 +145,8 @@ A module prefixed with `'./'` is relative to the file calling `require()`.
|
|||
That is, `circle.js` must be in the same directory as `foo.js` for
|
||||
`require('./circle')` to find it.
|
||||
|
||||
Without a leading '/' or './' to indicate a file, the module is either a
|
||||
"core module" or is loaded from a `node_modules` folder.
|
||||
Without a leading '/', './', or '../' to indicate a file, the module is either a
|
||||
core module or is loaded from a `node_modules` folder.
|
||||
|
||||
If the given path does not exist, `require()` will throw an Error with its
|
||||
`code` property set to `'MODULE_NOT_FOUND'`.
|
||||
|
|
Loading…
Reference in New Issue