canirequire

canirequireDual (CommonJS + ESM) › @hookform/resolvers

Is @hookform/resolvers ESM-only? Can you require() it?

React Hook Form validation resolvers: Yup, Joi, Superstruct, Zod, Vest, Class Validator, io-ts, Nope, computed-types, TypeBox, arktype, Typanion, Effect-TS and VineJS

Last verified Sep 9, 2026 against @hookform/resolvers@5.9.1. JSON

Dual (CommonJS + ESM) Dual package — both require() and import work

@hookform/resolvers publishes both a CommonJS entry and a native ESM entry (ESM added in 1.3.6). require("@hookform/resolvers") and import "@hookform/resolvers" both work on every supported Node.js version and in Bun.

Latest
5.9.1 (Aug 17, 2026)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
5.9.1
Native ESM since
1.3.6
TypeScript types
Bundled
Node engines
not declared
Weekly downloads
39.9M
License
MIT

Does @hookform/resolvers@5.9.1 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("@hookform/resolvers") from a CommonJS file and import "@hookform/resolvers" from an ES module.

Runtimerequire("@hookform/resolvers")import "@hookform/resolvers"
Node.js 18✓ works✓ works
Node.js 20✓ works✓ works
Node.js 22✓ works✓ works
Node.js 24✓ works✓ works
Node.js 26✓ works✓ works
Bun 1.4✓ works✓ works

How to import @hookform/resolvers

ES modules (import)

import resolvers from "@hookform/resolvers";

CommonJS (require)

const resolvers = require("@hookform/resolvers");

Module format by version

Derived from the type, main and exports fields of every stable release on npm (112 versions; the newest 60 shown).

VersionsFormatFirst published
2.9.3 – 5.9.1Dual (CommonJS + ESM)Jun 24, 2022

Frequently asked

Is @hookform/resolvers ESM-only?

@hookform/resolvers@5.9.1 ships CommonJS and ESM builds. @hookform/resolvers publishes both a CommonJS entry and a native ESM entry (ESM added in 1.3.6). require("@hookform/resolvers") and import "@hookform/resolvers" both work on every supported Node.js version and in Bun.

Can I require @hookform/resolvers?

Yes. @hookform/resolvers ships a CommonJS entry, so require("@hookform/resolvers") works on every Node.js version, alongside the native ESM entry for import.

Does @hookform/resolvers work in Bun?

Yes. import "@hookform/resolvers" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does @hookform/resolvers ship TypeScript types?

Yes. @hookform/resolvers bundles its own type declarations; no @types package is needed.

Links

Other dual (commonjs + esm) packages

Similar popularity