npm · npm:optional-require
optional-require active
NodeJS Require that let you handle module not found error without try/catch
The latest stable version of optional-require is 2.1.1, published on 2026-08-30. Verified by Vigia on 2026-11-12.
| Latest stable version | 2.1.1 |
|---|---|
| Published | 2026-08-30 16:39:24 UTC |
| Install | npm install optional-require@latest |
| Requires (engines) | {"node":">=20"} |
| Peer dependencies | — |
| Dist-tags | v1: 1.1.10 latest: 2.1.1 |
| License | Apache-2.0 |
| Advisories on latest version | none known |
| Last verified | 2026-11-12 12:44:28 UTC |
| Sources | api.deps.dev, registry.npmjs.org, registry.npmjs.org |
Maintenance
| Activity | active |
|---|---|
| Last stable release | 2026-08-30 16:39:24 UTC · 74 days ago |
| Stable releases in the last 12 months | 1 |
| Published versions | 26 |
Heuristic based only on release dates; it does not measure issue or security response times.
Version history
| Version | Published |
|---|---|
2.1.1 | 2026-08-30 16:39:24 UTC |
2.1.0 | 2025-07-06 15:37:59 UTC |
2.0.4 | 2025-07-01 03:06:20 UTC |
1.1.10 | 2025-07-01 03:05:37 UTC |
2.0.3 | 2025-07-01 01:28:02 UTC |
1.1.9 | 2025-07-01 01:13:09 UTC |
2.0.2 | 2025-07-01 00:18:17 UTC |
2.0.1 | 2025-06-03 08:55:59 UTC |
2.0.0 | 2025-05-31 21:42:01 UTC |
1.1.8 | 2021-09-22 06:14:16 UTC |
1.1.7 | 2021-08-12 23:15:16 UTC |
1.1.6 | 2021-08-07 15:52:34 UTC |
1.1.5 | 2021-08-07 08:55:19 UTC |
1.1.4 | 2021-08-05 15:36:07 UTC |
1.1.3 | 2021-08-05 15:22:10 UTC |
1.1.2 | 2021-08-05 15:16:48 UTC |
1.1.1 | 2021-07-28 18:01:54 UTC |
1.1.0 | 2021-07-22 16:03:43 UTC |
1.0.3 | 2021-04-10 20:38:19 UTC |
1.0.2 | 2020-07-18 18:37:28 UTC |
Showing the 20 most recent of 26 versions. JSON
Version compatibility
Newest stable version that declares support for each runtime version (from the requirements published with each version).
| Runtime | Newest compatible version |
|---|---|
node 16 | 1.1.10 |
node 18 | 1.1.10 |
node 20 | 2.1.1 |
node 22 | 2.1.1 |
node 24 | 2.1.1 |
Give your AI agent these facts
Vigia is a free MCP server: your coding agent checks versions, breaking changes and vulnerabilities before it writes code. No signup, no API key.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Add to CursorAdd to VS Code★ Star on GitHub
Any other MCP client
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Agent skill (SKILL.md): tells the agent when to use Vigia · GitHub Action for pull requests
Frequently asked questions
What is the latest version of optional-require?
The latest stable version of optional-require is 2.1.1, published on 2026-08-30. Verified by Vigia on 2026-11-12.
How do I install the latest version of optional-require?
Run npm install optional-require@latest. The latest stable version is 2.1.1 (verified 2026-11-12).
Is optional-require deprecated?
No. optional-require is not marked as deprecated in the registry.
Which Node.js version does optional-require require?
optional-require 2.1.1 declares this requirement: {"node":">=20"}.
Does optional-require 2.1.1 have known vulnerabilities?
No known advisories affect optional-require 2.1.1 according to the data Vigia checks.
Is optional-require still maintained?
optional-require published 1 stable releases in the last 12 months; the most recent was 74 days ago. Activity: active.
Observed changes
No changes observed yet since Vigia started tracking this package.
Related packages
- @vue/cli-shared-utils
- countup.js
- @stdlib/assert-has-uint32array-support
- @zag-js/angle-slider
- @types/json2csv
- @remix-run/node
- @electron-forge/maker-zip
- beeper
- react-async-script
- io-ts-types
- @types/symlink-or-copy
- @docusaurus/plugin-content-docs
Badges for your README
Show the latest version, maintenance status and deprecation status of this package. Copy the Markdown:
[](https://vigia.coredls.cloud/npm/optional-require) [](https://vigia.coredls.cloud/npm/optional-require) [](https://vigia.coredls.cloud/npm/optional-require)
For agents
GET https://vigia.coredls.cloud/v1/packages/npm/optional-require
GET https://vigia.coredls.cloud/v1/packages/npm/optional-require/versions/{version}