Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in some compilation contexts (due to circular dependencies?) #580

Open
eroux opened this issue Oct 30, 2022 · 0 comments
Open

error in some compilation contexts (due to circular dependencies?) #580

eroux opened this issue Oct 30, 2022 · 0 comments

Comments

@eroux
Copy link

eroux commented Oct 30, 2022

I'm experiencing a bug in an edge case of compilation. The issue can be boiled down the to following example:

git clone https://github.com/eroux/mwe-bug2.git
cd mwe-bug2
yarn build
yarn link
cd ..
git clone https://github.com/eroux/mwe-bug3.git
yarn link mwe-bug2
yarn start

the compilation works but then the app crashes in the browser with a cryptic error message

Uncaught TypeError: Super expression must either be null or a function

This only happens when using yarn link. Note also that changing

export const defaultGraphNode = new rdf.NamedNode(rdf.Store.defaultGraphURI)

into

export const defaultGraphNode = rdf.sym(rdf.Store.defaultGraphURI)

makes everything work for some reason.

According to this so answer, this could be due to circular dependencies. I checked rdflib with dpdm and it reports 97 circular dependencies in rdflib.js.

In my experience, fixing this is not particularly straightforward, but if a PR can be accepted, I might give it a try

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

No branches or pull requests

1 participant