Skip to content

TypeError: Cannot set property graph of #<Quad> which has only a getter #137

Closed
@yhdelgado

Description

@yhdelgado

I am trying to deploy ldf-server in my shared hosting using the latest version of the package. After executed ldf-server config.json everything is ok, but after the first request to the server, the process exit and throw the following error:

@ldf/core/lib/datasources/Datasource.js:150
      quad.graph = quad.graph && quad.graph.termType !== 'DefaultGraph' ? quad.graph : (graph || quad.graph);
                 ^
TypeError: Cannot set property graph of #<Quad> which has only a getter
    at SimpleTransformIterator._map

To reproduce the error:

You can reproduce the problem by trying the following.

  1. npm install -g @ldf/server
  2. ldf-server config.json

Here my config.json file:

{
  "@context": "https://linkedsoftwaredependencies.org/bundles/npm/@ldf/server/^3.0.0/components/context.jsonld",
  "@id": "urn:ldf-server:my",
  "import": "preset-qpf:config-defaults.json",

  "title": "Linked Data Fragments server",
  "port": 30000,
  "workers": 1,
  "protocol": "http",

  "datasources": [
    {
      "@id": "ex:linkedDlsource",
      "@type": "HdtDatasource",
      "datasourceTitle": "LinkedDL 2021",
      "description": "Short description here",
      "datasourcePath": "linkeddl",
      "hdtFile": "data/raw-data.hdt"
    }
 ]
}

Note: I downloaded the source code from github.com and installed it. Everything works as expected. Same HDT file and config file. For some reason, compiling from source code works fine, but from the npm registry doesn't.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions