Ontotext-AD/graphdb.js

TypeError: Cannot read property 'NamedNode' of undefined

Closed this issue · 2 comments

Library version 1.2.0

Node.js version 12.14.1

NPM version 6.13.4

Bug
Getting TypeError: Cannot read property 'NamedNode' of undefined when trying to import:

const {ServerClient, ServerClientConfig}	= require('graphdb').server;
const {RDFMimeType} 

To Reproduce
I just installed the library with npm i graphdb in an empty node.js project. Then, I tried to start a client to access a RDF4J server:

const {ServerClient, ServerClientConfig} = require('graphdb').server;
const {RDFMimeType} = require('graphdb').http;

const serverConfig = new ServerClientConfig('http://host:port/rdf4j-server/', 0, {
	'Accept': RDFMimeType.SPARQL_RESULTS_JSON
});

this.client = new ServerClient(serverConfig);

The same error occurs in NPM Runkit: https://npm.runkit.com/graphdb

What am I doing wrong?

This should be fixed with #84
@teodossidossev Can you recheck again and close this one.

It is fixed in 1.2.1