Last night I let my laptop run out of charge, causing it to fully shut down, which it rarely does. When getting back to it, I accidentally ran the old Deno installation of Sillverbullet V1 on my V2 notes directory.
Whoops!
Well, upon running my actual silverbullet v2 installation (which I grab from github and run directly), it appears my ability to query anything or call commands has broken.
Lua scripts that don’t rely on queries or widgets (such as my shortlink scripts) still work, but this sort of thing:
renders an Attempting to call nil as a function error.
Queries used by scripts also throw this error to console when reindexing:
Error evaluating script: Attempting to call nil as a function at [[script/projectutil@696]]
I attempted to run the Silverbullet V2 installation on a new, empty directory as well - this issue persists there too. I also tried pulling the fresh edge release from github - same problem.
Ahha! Well, it was a stupid mistake. This comment helped me catch it, thanks @MrMugame!
I’d forgotten the sync button was disabled in v2, and not something I’d removed manually. Realizing that prompted me to be really sure that I was actually running the v2 installation - and I was not.
Somehow running the deno installation this morning reset my alias so that silverbullet pointed to the V1 version. I failed to notice that it was using an alias at all, as I was used to just starting my terminal in it’s directory and calling it with the local path.
I also had to reset the cache, delete the [[SETTINGS]] and silverbullet.db files created by v1, and now I have my queries back!