The module is using exports.default with exports.__esModule, but it's not setting module.exports directly. This is causing a behavior difference between Node.js and most bundlers when using ESM.
import cron from 'cron-validate';
// This works in Node, but fails in most bundlers
cron.default('').isValid();
// This works in bundlers, but throws 'TypeError: cron is not a function' when
// run in Node (and also causes TypeScript to complain)
cron('').isValid();
For more details see:
The module is using
exports.defaultwithexports.__esModule, but it's not settingmodule.exportsdirectly. This is causing a behavior difference between Node.js and most bundlers when using ESM.For more details see: