Skip to content

Conversation

@calebeby
Copy link

@calebeby calebeby commented Oct 3, 2025

This fixes the error when I try to run the example from the README:

......./asciimath-test/node_modules/.pnpm/[email protected]/node_modules/mathml2asciimath/index.js:1
const XmldomInterface = require('./interfaces/XmldomInterface');
                        ^

ReferenceError: require is not defined in ES module scope, you can use import instead

Node assumes that this package is an ESM package (import/export) because you told it so. But it is not, since you are using require/module.exports instead.

This PR makes the package usable in nodejs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant