ERR_NO_CLIENTS with a DgraphClientStub provided

Posted by zangornjak:

I’m trying to use the module in an Electron application but I get the ERR_NO_CLIENTS: Error: No clients provided in DgraphClient constructor error. The DgraphClientStub however is provided and alpha / zero are both running and reachable through ratel.

const dgraph = require('dgraph-js-http')

const dgraphClientStub = new dgraph.DgraphClientStub()
const dgraphClient = new dgraph.DgraphClient(dgraphClientStub)

console.log(dgraph, dgraphClient, dgraphClientStub)

I’ve tried with the latest version "dgraph-js-http": "20.3.0"

and branch v1.1.0-rc2 "dgraph-js-http": "file:/./build-steps/dgraph-js-http-1.1.0-rc2".

zangornjak commented :

I’m closing this issue thanks to @prashant-shahi for providing GitHub - prashant-shahi/electron-todo: Todo app made in Electron powered by Dgraph as a primer to work off of.