hydra-core icon indicating copy to clipboard operation
hydra-core copied to clipboard

Problems when using it in nodejs

Open pietercolpaert opened this issue 10 years ago • 1 comments

Tried to experiment with hydra-core in nodejs:

  • Promise wasn't set. Fixed this by adding var Promise = require('es6-promise').Promise; to model.js. Seems to be loaded globally in the example files
  • Now gives an error options.uri is a required argument

Any idea?

pietercolpaert avatar Sep 30 '15 21:09 pietercolpaert

Yes, in the examples the Promise lib is loaded globally. Since most nodejs installations today support Promises out of the box I'm not sure if this is something that needs to be fixed.

Do you have an example code or the full stack of the error message? I think it's a jsonld error, but caused by hydra-core because of a missing parameter.

bergos avatar Oct 04 '15 20:10 bergos