ssbc / ssb-links

ssb-plugin that indexes all the links!
MIT License
9 stars 8 forks source link

Link to correct flumeViewQuery file and call the imported function right. #9

Closed HendrikPetertje closed 4 years ago

HendrikPetertje commented 5 years ago

There seems to be a small issue when calling flumeview-query. When executing this plugin (from a fresh install) the following error is raised:

ssb-server 14.1.12 /Users/user/.ssb logging.level:notice
my key ID: ************************
internal/modules/cjs/loader.js:670
    throw err;
    ^

Error: Cannot find module 'flumeview-query/links'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/Users/user/ssb/node_modules/ssb-links/index.js:2:23)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)

Checking in with the flumeView-query code it quickly turns out:

I've fixed the file and am now calling the functions according to: https://github.com/flumedb/flumeview-query#api--flumeviewqueryversion-indexes-filter-map--flumeview-query

It's up to the maintainer to decide if the index should be raised from 3 to 4.

Edit: indexes in the line above should be "versions" as per:

version must be an number. When you update any options, change the version and the index will rebuild. opts is the options. in particular {indexes: [...]} is mandatory. https://github.com/flumedb/flumeview-query#api--flumeviewqueryversion-indexes-filter-map--flumeview-query

HendrikPetertje commented 5 years ago

PS, Love the stuff you guys are doing. It's bit of a hassle to setup git-ssb (the reason I'm diving into this), but it's a lot of fun!

dominictarr commented 5 years ago

oh this was because I mistakenly updated this to use flumeview-query@7, but it only actually works with flumeview-query@6, this was fixed in 3.0.6

stale[bot] commented 5 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

christianbundy commented 4 years ago

@HendrikPetertje Could you confirm that this was resolved for you in 3.0.6?

christianbundy commented 4 years ago

Confirmed that this is no longer a bug. Closing now.