mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-26 11:02:01 -04:00
When `node-linker` is set to `hoisted`, a meaningful error message should be thrown if the lockfile is broken and `pnpm install` is executed.
@pnpm/error
An error class for pnpm errors
Installation
pnpm add @pnpm/error
Usage
import PnpmError from '@pnpm/error'
try {
throw new PnpmError('THE_ERROR_CODE', 'The error message')
} catch (err: any) { // eslint-disable-line
console.log(err.code)
//> ERR_PNPM_THE_ERROR_CODE
console.log(err.message)
//> The error message
}
License
MIT