Browse Source

docs: Add docs for MODULE_NOT_FOUND error.

v0.7.4-release
Nathan Rajlich 13 years ago
committed by koichik
parent
commit
ec11525d33
  1. 3
      doc/api/modules.markdown

3
doc/api/modules.markdown

@ -115,6 +115,9 @@ That is, `circle.js` must be in the same directory as `foo.js` for
Without a leading '/' or './' to indicate a file, the module is either a Without a leading '/' or './' to indicate a file, the module is either a
"core module" or is loaded from a `node_modules` folder. "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 from `node_modules` Folders ### Loading from `node_modules` Folders
If the module identifier passed to `require()` is not a native module, If the module identifier passed to `require()` is not a native module,

Loading…
Cancel
Save