# require-native-executable

> Small utility ot check if a native executable exists, and if not, print an error message

Latest version **1.0.1** (published 2018-04-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install require-native-executable
pnpm add require-native-executable
yarn add require-native-executable
bun add require-native-executable
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-04-17 |
| First published | 2018-04-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rapidfacture GmbH |
| Maintainers | ulikoehler |
| Keywords | native, executable, exists, check |

## Links

- npm: https://www.npmjs.com/package/require-native-executable
- Repository: https://github.com/Rapidfacture/require-native-executable
- Homepage: https://github.com/Rapidfacture/require-native-executable#readme
- Issues: https://github.com/Rapidfacture/require-native-executable/issues
- npm.io page: https://npm.io/package/require-native-executable

## Dependencies (1)

- [command-exists](https://npm.io/package/command-exists.md) ^1.2.6

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-04-17

## README

# require-native-executable
NodeJS startup check utility that ensures a native executables exists and else fails.

### Sync require

We recommend that you place this code in your module after your `require()` statements.

```js
const {requireNativeExecutableSync} = require("require-native-executable");

// Each of those will throw if the executable is not present
requireNativeExecutableSync('bash');
requireNativeExecutableSync('java');
```

The generated error will be a `NativeExecutableMissingError` and look like this:

```
The native executable 'java' was not found on your system but is required to load this application.
```

Use `err.exeName` to get the name of the missing executable

### Async require

```js
const {requireNativeExecutable} = require("require-native-executable");

// Will
requireNativeExecutable('java').then(() => {
    // Executable exists
}).catch(err => {
    // err will be a NativeExecutableMissingError, see above for an example.
});
```

---
_Source: https://npm.io/package/require-native-executable · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
