{"library":"load-esm","type":"library","category":null,"description":"load-esm is a lightweight utility designed for TypeScript projects configured with CommonJS (`\"module\": \"commonjs\"`) that need to dynamically load pure ECMAScript Modules (ESM) at runtime. It directly addresses common interoperability errors such as `Error [ERR_REQUIRE_ESM]: require() of ES Module` and `Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No \"exports\" main defined in ...`. The utility functions by executing the native `import()` call outside of TypeScript's CommonJS transpilation scope, thereby preserving the correct dynamic import semantics at runtime. This approach provides a robust and type-safe solution without resorting to brittle workarounds like `eval()`. The current stable version is 1.0.3, with releases primarily focused on documentation improvements and ensuring compatibility with evolving Node.js and TypeScript ecosystems. Its key differentiator is providing a consistent, reliable mechanism for ESM-in-CJS loading across various Node.js versions, even beyond Node.js 22.12's `require()`-based ESM loading limitations.","language":"javascript","status":"active","version":"1.0.3","tags":["javascript","load-esm","ESM","Import ESM","CJS","CommonJS","TypeScript","Node.js","dynamic import","typescript"],"install":[{"cmd":"npm install load-esm","imports":["import { loadEsm } from 'load-esm';","await loadEsm<typeof import('my-esm-package')>('my-esm-package');"]},{"cmd":"yarn add load-esm","imports":[]},{"cmd":"pnpm add load-esm","imports":[]}],"homepage":null,"github":"https://github.com/Borewit/load-esm","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/load-esm","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/load-esm/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}