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

Comunica (sub-)dependencies missing #74

Open
renyuneyun opened this issue Oct 23, 2023 · 0 comments
Open

Comunica (sub-)dependencies missing #74

renyuneyun opened this issue Oct 23, 2023 · 0 comments

Comments

@renyuneyun
Copy link

I'm trying to use LDflex with Solid, on a Vue project. The base LDflex library works fine.
Then I followed the README of Query-Solid (this repo), installed @solid/query-ldflex, and copied the example code to a separate file. However, after importing that code file, the following errors emerge in the build tool:

✘ [ERROR] Could not resolve "@comunica/actor-rdf-join-symmetrichash"

    node_modules/@solid/query-ldflex/node_modules/@ldflex/comunica/lib/comunica-engine.js:78:157:
      78 │ ... new (require('@comunica/actor-rdf-join-symmetrichash').ActorRdfJoi...
         ╵                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@comunica/actor-rdf-join-symmetrichash" as external to
  exclude it from the bundle, which will remove this error. You can also surround
  this "require" call with a try/catch block to handle this failure at run-time
  instead of bundle-time.

✘ [ERROR] Could not resolve "@comunica/actor-rdf-join-nestedloop"

    node_modules/@solid/query-ldflex/node_modules/@ldflex/comunica/lib/comunica-engine.js:82:154:
      82 │ ...= new (require('@comunica/actor-rdf-join-nestedloop').ActorRdfJoinN...
         ╵                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@comunica/actor-rdf-join-nestedloop" as external to exclude
  it from the bundle, which will remove this error. You can also surround this
  "require" call with a try/catch block to handle this failure at run-time instead
  of bundle-time.
...

(I have truncated the error. Lots of more lines with similar things, all related to some comunica modules.)

The error message seems to indicate these lines are dynamic imports, that are not properly dealt with?

I'm using Vite as build tool, and uses import statements rather than require function. The default configuration should convert all import to require, if I understand correctly, so probably unrelated to ES module.

See https://github.com/renyuneyun/minimal-reproduction/tree/master/ldflex-getting-started for a MRE. Import is controlled in the beginning of file https://github.com/renyuneyun/minimal-reproduction/blob/master/ldflex-getting-started/src/App.vue

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