commontoolsinc / synopsys

datastore service for datums
2 stars 1 forks source link

`undefined is not iterable` when using `Match` #32

Closed bfollington closed 1 month ago

bfollington commented 1 month ago

I'm following the examples (as far as I can tell, see: https://github.com/Gozala/datalogia/blob/c5adf5543c81caf9580649f9821c07e82a635cd0/test/formula.spec.js#L631) but I'm still getting:

{
    "error": {
        "message": "undefined is not iterable (cannot read property Symbol(Symbol.iterator))"
    }
}

Here's the query I'm sending (literally) over the network:

{
  "select": {
    "collection": "?collection",
    "item": [
      {
        "item": "?item",
        "key": "?key",
        "value": "?value"
      }
    ]
  },
  "where": [
    {
      "Case": [
        "?collection",
        "member",
        "?item"
      ]
    },
    {
      "Case": [
        "?item",
        "?key",
        "?value"
      ]
    },
    {
      "Match": [
        {
          "text": "?value",
          "pattern": "*email*"
        },
        "text/like"
      ]
    }
  ]
}

I seem to get the same response for pretty much any values/permutations of the parameters. This is true even with an empty service-store folder, ruling out invalid data.

bfollington commented 1 month ago

Hm, after rm -rf ./node_modules and npm i the problem no longer presents. There's a chance I just forgot to hit install after pulling.