You're using require() on a package that only ships ES Modules (it declares "type": "module" or only exports .mjs). Either switch your file to ESM and use import, or use a dynamic import() instead of require().