hyperjump-io / uri

A small and fast library for validating, parsing, and resolving URIs (RFC 3986) and IRIs (RFC 3987).
2 stars 1 forks source link

Does this support CommonJS? #4

Open whitedotjsx opened 1 month ago

whitedotjsx commented 1 month ago
Error [ERR_REQUIRE_ESM]: require() of ES Module /mnt/c/Code/Asuka/node_modules/@hyperjump/json-schema/stable/index.js from /mnt/c/Code/Asuka/src/tests/examples/tempCodeRunnerFile.js not supported.
Instead change the require of index.js in /mnt/c/Code/Asuka/src/tests/examples/tempCodeRunnerFile.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/mnt/c/Code/Asuka/src/tests/examples/tempCodeRunnerFile.js:2:19) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v20.13.1
jdesrosiers commented 1 month ago

No. It's designed for ESM only.