The package linked to from here is now pure ESM.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'instead ofconst foo = require('foo')to import the package. - If the package is used in an async context, you could use
await import(…)instead ofrequire(…). - Stay on the existing version of the package until you can move to ESM.
I would strongly recommend moving to ESM. ESM can still import CommonJS packages, but CommonJS cannot import ESM packages synchronously.
You can read more about my ESM plans.