Skip to content

require() of ES Module rdfoo not supported #55

@bbartley

Description

@bbartley

Using Node.js v18.8.0 and the minimal example in the README, I get the following error originating in the rdfoo dependency when trying to import sboljs into a script both via require or dynamic import:

/Users/bbartley/Dev/git/idt/node_modules/rdfoo/dist/rdfoo/node.js:4
const rdf_ext_1 = require("rdf-ext");
                  ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/bbartley/Dev/git/idt/node_modules/rdfoo/node_modules/rdf-ext/index.js from /Users/bbartley/Dev/git/idt/node_modules/rdfoo/dist/rdfoo/node.js not supported.
Instead change the require of index.js in /Users/bbartley/Dev/git/idt/node_modules/rdfoo/dist/rdfoo/node.js to a dynamic import() which is available in all CommonJS modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions