$ npm install module-not-found-error
Create a module not found error
$ npm install --save module-not-found-error
var moduleNotFoundError = require('module-not-found-error')
var err = moduleNotFoundError('foo')
//=> err.message: Cannot find module 'foo'
//=> err.code: 'MODULE_NOT_FOUND'
moduleNotFoundError(id) -> errReturns an error with the appropriate message and code.
idRequired
Type: string
A module name or path passed to require.
MIT © Ben Drucker
© 2010 - cnpmjs.org x YWFE | Home | YWFE