1. module-not-found-error
Create a module not found error
module-not-found-error
Package: module-not-found-error
Created by: bendrucker
Last modified: Mon, 20 Jun 2022 03:40:52 GMT
Version: 1.0.1
License: MIT
Downloads: 1,909,942
Repository: https://github.com/bendrucker/module-not-found-error

Install

npm install module-not-found-error
yarn add module-not-found-error

module-not-found-error Build Status

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code