Skip to content

Query to http url fails with Node 18+#1252

Description

@gbirke

Issue type:

  • 馃悰 Bug

Description:

I've set up a local web server with a turtle file and tried to run a "hello world" query from the command line like this:

comunica-sparql http://127.0.0.1:6000/example1.ttl -q "SELECT *  WHERE { ?s ?p ?o }" 

When running this with Node 18, I get the error message "fetch error". When I run this in a docker environment with Node 16 (changing the URL from the local IP to the name of the container), the query succeeds.

I can only speculate about why this happens, but looking at my package.lock and node_modules I can see that it uses version 3.0.6 of cross-fetch which is not compatible with Node 18+ So maybe there is something in the dependency tree that forces it to be version 3 instead of version 4.

I've installed the CLI tool with npm install -g @comunica/query-sparql


Environment:

software version
Comunica Engine 2.8.2
node v18.17.1
npm 9.6.7
yarn 1.22.19
Operating System linux (Linux 6.2.0-26-generic)

Crash log:

https://pastebin.com/W5BuHYmP

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions