module-not-found-error ![Build Status](https://camo.githubusercontent.com/c4e85ccd23454bfde1bd0827e8cb0cf09e32daced0fddf96613871efc2112bb9/68747470733a2f2f7472617669732d63692e6f72672f62656e647275636b65722f6d6f64756c652d6e6f742d666f756e642d6572726f722e7376673f6272616e63683d6d6173746572)
Create a module not found error
Install
$ npm install --save module-not-found-error
Usage
var moduleNotFoundError = require('module-not-found-error')
var err = moduleNotFoundError('foo')
//=> err.message: Cannot find module 'foo'
//=> err.code: 'MODULE_NOT_FOUND'
API
moduleNotFoundError(id)
-> err
Returns an error with the appropriate message and code.
id
Required
Type: string
A module name or path passed to require
.
License
MIT © Ben Drucker