# @esm2cjs/npm-run-path

> Get your PATH prepended with locally installed binaries. This is a fork of sindresorhus/npm-run-path, but with CommonJS support.

Latest version **5.1.1-cjs.0** (published 2022-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @esm2cjs/npm-run-path
pnpm add @esm2cjs/npm-run-path
yarn add @esm2cjs/npm-run-path
bun add @esm2cjs/npm-run-path
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.1.1-cjs.0 |
| Published | 2022-08-18 |
| First published | 2022-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dominic Griesel |
| Maintainers | alcalzone |
| Keywords | npm, run, path, package, bin, binary, binaries, script, cli, command-line, execute, executable |

## Links

- npm: https://www.npmjs.com/package/@esm2cjs/npm-run-path
- Repository: https://github.com/esm2cjs/npm-run-path
- Homepage: https://github.com/esm2cjs/npm-run-path#readme
- Issues: https://github.com/esm2cjs/npm-run-path/issues
- Funding: https://github.com/sponsors/AlCalzone
- npm.io page: https://npm.io/package/@esm2cjs/npm-run-path

## Dependencies (1)

- [@esm2cjs/path-key](https://npm.io/package/@esm2cjs/path-key.md) ^4.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 5.1.1-cjs.0 (latest) — 2022-08-18
- 5.1.0 — 2022-08-18

## README

# @esm2cjs/npm-run-path

This is a fork of https://github.com/sindresorhus/npm-run-path, but automatically patched to support ESM **and** CommonJS, unlike the original repository.

## Install

You can use an npm alias to install this package under the original name:

```
npm i npm-run-path@npm:@esm2cjs/npm-run-path
```

```jsonc
// package.json
"dependencies": {
    "npm-run-path": "npm:@esm2cjs/npm-run-path"
}
```
but `npm` might dedupe this incorrectly when other packages depend on the replaced package. If you can, prefer using the scoped package directly:

```
npm i @esm2cjs/npm-run-path
```

```jsonc
// package.json
"dependencies": {
    "@esm2cjs/npm-run-path": "^ver.si.on"
}
```

> **Note:**
> We strive to use the same versions as the upstream package, but unfortunately there is a bit of a learning curve with these things.
> As a result, we had to re-publish `5.1.0` as `5.1.1-cjs.0`.

## Usage

```js
// Using ESM import syntax
import { npmRunPath, npmRunPathEnv } from "npm-run-path";

// Using CommonJS require()
const { npmRunPath, npmRunPathEnv } = require("npm-run-path");
```

For more details, please see the original [repository](https://github.com/sindresorhus/npm-run-path).

## Sponsoring

To support my efforts in maintaining the ESM/CommonJS hybrid, please sponsor [here](https://github.com/sponsors/AlCalzone).

To support the original author of the module, please sponsor [here](https://github.com/sindresorhus/npm-run-path).

---
_Source: https://npm.io/package/@esm2cjs/npm-run-path · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
