node TW upgrade weirdness

224 views
Skip to first unread message

Dave

unread,
Sep 27, 2019, 5:53:34 PM9/27/19
to TiddlyWiki
I've upgraded TW5 node version to the latest, but when I start Bob (node TW5) its still stuck at 5.1.18

Here's the terminal output:

david@grey  3 pm> sudo npm update -g tiddlywiki
[sudo] password for david: 
/home/david/.npm-global/bin/tiddlywiki -> /home/david/.npm-global/lib/node_modules/tiddlywiki/tiddlywiki.js
/home/david/.npm-global/lib
└── tiddl...@5.1.21 

david@grey  3 pm> tiddlywiki --version
5.1.21
david@grey  3 pm> cd /home/david/SyncthingFolders/Bob/TiddlyWiki5;node ./tiddlywiki.js Wikis/BobWiki  --wsserver
NodeSettings - Parsed raw settings.
Added route /^\/NewWiki\/?$/
Added route /^\/textAnalysis\/?$/
TiddlyWiki version 5.1.18 with Bob version 1.2.4
Serving on 0.0.0.0:8080


Can anyone explain what's going on? (and how to fix it)

Thanks,
- Dave

Jed Carty

unread,
Sep 28, 2019, 3:56:56 AM9/28/19
to TiddlyWiki
You have tiddlywiki installed twice, once globally, which you updated, and once in syncthing which you ran.

Either run the global version by leaving the 'node ./' off, so it starts with 'tiddlywiki'.

Or you pull the changes from the tiddlywiki repo and checkout the tag for v5.1.21

Dave

unread,
Sep 28, 2019, 2:18:52 PM9/28/19
to TiddlyWiki
Thank you, I wasn't aware there were different ways to do that.  I'll try and post back if there are further difficulties :)


While you're around, I'd like to ask one more question.

In the past several months has there been any further simplification of getting a secure server going on a pi for example for dummies (moi)?  

I find the whole key security not-letting-hackers-in-to-your-system thing daunting.  Or if not, is there a learning source you'd recommend to be able to follow the steps you had on your git hub.  I tried a few months ago to set up a digital ocean secure server but couldn't figure it out.  I'm hoping that getting a single server going might help me have access to my wiki from everywhere without the syncthing-Bob conflicts that cause tiddlers to keep reverting to earlier versions (although I'm also hoping getting everything up to date might help that too).  Also it would allow access from mobile on the road (the Termux solution is super slow on the phone and unstable)

If not that's fine too, beggars can't be choosers ;)

Dave

unread,
Sep 29, 2019, 12:11:08 AM9/29/19
to TiddlyWiki
I tried what you said:

david@lat> tiddlywiki.js Wikis/BobWiki  --wsserver
tiddlywiki.js: command not found


and it didn't like that.  It said "command not found" even though tiddlywiki.js is definitely in that folder

I also tried 

tiddlywiki tiddlywiki.js Wikis/BobWiki  --wsserver


but no luck there.

I'll keep trying to figure it out from your documentation

Jed Carty

unread,
Sep 29, 2019, 3:23:40 AM9/29/19
to TiddlyWiki
Sorry, I didn't say that well, this isn't a Bob thing so my documentation isn't going to help here.

When you install tiddlywiki globally it makes it so that typing 'tiddlywiki' anywhere is the same as typing 'node tiddlywiki.js' in the folder where it is installed globally.

So in your case you have a global install of tiddlywiki in /home/David/.npm-global/lib/node_modules/tiddlywiki
when you type 'tiddlywiki' it is the equivalent of 'node /home/David/.npm-global/lib/node_modules/tiddlywiki/tiddlywiki.js'

so what you need to type is 'cd /home/david/SyncthingFolders/Bob/TiddlyWiki5;tiddlywiki Wikis/BobWiki --wsserver'

One thing to remember is that this is using the global install of tiddlywki which isn't in the syncthing folder, so if you are relying on tiddlywiki syncing too than you need to update the tiddlywiki version in the syncthing folder.

Jed Carty

unread,
Sep 29, 2019, 3:29:58 AM9/29/19
to TiddlyWiki
To answer your other question, yes we have made significant progress on the secure wiki front, we are working on a setup where you just run one script that installs everything then you open the wiki for the first time and it brings you through a setup wizard for all the configuration.

My brother wants to look at different licensing options for it, I am not sure how that is going to to turn out.

Dave

unread,
Sep 30, 2019, 6:41:55 PM9/30/19
to TiddlyWiki
Hi, sorry to be a pain, but here's the error I'm getting:

david@grey  4 pm> sudo npm update -g tiddlywiki
[sudo] password for david: 
david@grey  4 pm> tiddlywiki --version
5.1.21
david@grey  4 pm> cd /home/david/SyncthingFolders/Bob/TiddlyWiki5;tiddlywiki Wikis/BobWiki --wsserver
Warning: Cannot find plugin 'OokTech/Bob'


david@grey  4 pm> pkill node && cd /home/david/SyncthingFolders/Bob/TiddlyWiki5/plugins/OokTech/Bob && git pull
Already up to date.
david@grey  4 pm> cd /home/david/SyncthingFolders/Bob/TiddlyWiki5;tiddlywiki Wikis/BobWiki --wsserver
Warning: Cannot find plugin 'OokTech/Bob'

have I somehow screwed up my folders?  I did the above in order though, so I can't see why this shouldn't work

Dave

unread,
Sep 30, 2019, 9:25:30 PM9/30/19
to TiddlyWiki
here's my settings file, maybe something here is wrong from when I was using the non-global version

(/home/david/SyncthingFolders/Bob/TiddlyWiki5/Wikis/BobWiki/settings/settings.json)

{
  "wikis": {
    "NewWiki": "./Wikis/NewWiki",
    "textAnalysis": "./Wikis/textAnalysis"
  },
  "ws-server": {
    "port": 8080,
    "host": "0.0.0.0",
    "autoIncrementPort": ""
  },
  "suppressBrowser": "",
  "API": {},
  "serverInfo": {
    "ipAddress": "10.233.53.119",
    "port": 8080,
    "host": "0.0.0.0"
  },
  "includePluginList": {},
  "excludePluginList": {},
  "somefield": "somefieldcontent",
  "wikisPath": "./Wikis",
  "wikiPathBase": "/home/david/SyncthingFolders/Bob/TiddlyWiki5"
}






Jed Carty

unread,
Oct 1, 2019, 3:43:45 AM10/1/19
to TiddlyWiki
This a tiddrywiki thing. The global tiddlywiki install has no way to know where the Bob plugin is.

In the readme en github right above the 'updating bob on a manual install' heading it explains how to set environment variables to point to your plugin folder. This has to be done each time you start a new terminal session.

Alternately you could clone the bob repo into the plugins folder of the global tiddlywiki install.

Dave

unread,
Oct 1, 2019, 1:15:45 PM10/1/19
to TiddlyWiki
great, thank you so much.  I'll try that


and re your license topic, I would happily pay a reasonable amount to get a stable secure bob installed via some "one click just pick a password" method for a DO droplet or a pi or something like that.  If my vote counts at all, I'd rather pay more for a single one time licence rather than a subscription model

Dave

unread,
Oct 3, 2019, 12:42:41 AM10/3/19
to TiddlyWiki
I think I'm getting closer, but still no cigar

Here's what I think you told me to do:
export TIDDLYWIKI_PLUGIN_PATH="/path/to/your/plugins"
export TIDDLYWIKI_EDITION_PATH="/path/to/your/editions"
tiddlywiki editions
/BobWiki  --wsserver

so this is what I filled in to try that:
export TIDDLYWIKI_PLUGIN_PATH="/home/david/SyncthingFolders/Bob/TiddlyWiki5/plugins"
export TIDDLYWIKI_EDITION_PATH="/home/david/SyncthingFolders/Bob/TiddlyWiki5/Wikis"
tiddlywiki
Wikis/BobWiki  --wsserver

for reference here's what's in the plugins folder:
/home/david/SyncthingFolders/Bob/TiddlyWiki5/plugins/tiddlywiki (folder)
/home/david/SyncthingFolders/Bob/TiddlyWiki5/plugins/OokTech (folder)
and OokTech has the folder "Bob" in it

and here's where my tiddlers are:
/home/david/SyncthingFolders/Bob/TiddlyWiki5/Wikis/BobWiki/tiddlers/

Here's what's in the OokTech/Bob folder:
david@lat  10 pm> ls
 ActionWidgets                  LICENSE
 BobLogger.js                   MultiUserWiki
 Changelog.tid                  NodeSettings.js
 commands                       OokTechInfo
 Configuration.md               plugin.info
 ConflictList.tid               plugin-info.js
 CONTRIBUTING.md                README.md
 ControlPanel                   readme.tid
 CoreChanges                    RoadMap.md
 CoreSettingsOverride           ServerSide.js
 Documentation                  SharedFunctions.js
 EditableJSONViewTemplate.tid   Styles.tid
 ExcludeSync.tid                templates
 ExternalLibraries              TestCases.md
 FileSystemMonitor.js           theme-info.js
 getSetting.tid                 tiddler-metadata.tid
 ImportList.tid                 tid-tiddler.tid
 IssueGuidelines.md             WebSockets
 ISSUE_TEMPLATE.md             'Wiki Listing Folding.tid'
 language-info.js              'Wiki Listing.tid'

----

Here's the error I got (tried with and without the ending "/")

david@lat  10 pm> export TIDDLYWIKI_PLUGIN_PATH="/home/david/SyncthingFolders/Bob/TiddlyWiki5/plugins"
david@lat  
10 pm> export TIDDLYWIKI_EDITION_PATH="/home/david/SyncthingFolders/Bob/TiddlyWiki5/Wikis"
david@lat  
10 pm> tiddlywiki Wikis/BobWiki --wsserver
Error: Unknown command: wsserver


david@lat  
10 pm> export TIDDLYWIKI_PLUGIN_PATH="/home/david/SyncthingFolders/Bob/TiddlyWiki5/plugins/"
david@lat  
10 pm> export TIDDLYWIKI_EDITION_PATH="/home/david/SyncthingFolders/Bob/TiddlyWiki5/Wikis/"
david@lat  
10 pm> tiddlywiki Wikis/BobWiki --wsserver
Error: Unknown command: wsserver



I also tried this:
david@lat  10 pm> tiddlywiki /BobWiki --wsserver
Error: Unknown command: wsserver
david@lat  
10 pm> tiddlywiki BobWiki --wsserver
Error: Unknown command: wsserver


And I tried this:
david@lat  10 pm> tiddlywiki editions/BobWiki --wsserver
Error: Unknown command: wsserver
david@lat  
10 pm> tiddlywiki editions/Wikis/BobWiki --wsserver
Error: Unknown command: wsserver




Should I just use BobExe instead? Or am I almost there?

Jed Carty

unread,
Oct 3, 2019, 4:22:16 PM10/3/19
to TiddlyWiki
The current version of BobEXE has some bugs that are causing trouble, but that is up to you. In general it makes things much simpler.

This should make your thing work:

export TIDDLYWIKI_PLUGIN_PATH="/home/david/SyncthingFolders/Bob/TiddlyWiki5/plugins"
export TIDDLYWIKI_EDITION_PATH="/home/david/SyncthingFolders/Bob/TiddlyWiki5/Wikis"

tiddlywiki
/home/david/SyncthingFolders/Bob/TiddlyWiki5/Wikis/BobWiki  --wsserver

Dave

unread,
Oct 4, 2019, 12:44:32 AM10/4/19
to TiddlyWiki
Yay! Thank you :)  for some reason I'd assumed that was supposed to be a relative path (D'Oh!)

Dave

unread,
Oct 13, 2019, 12:33:41 AM10/13/19
to TiddlyWiki
Hi again,

I just updated to the new version (Tofurkey) and now I'm getting this on startup:

NodeSettings - Parsed raw settings.

Error executing boot module $:/plugins/OokTech/Bob/Federation/chatview.js: {}



$:/plugins/OokTech/Bob/Federation/chatview.js:51

    } catch {

            ^



SyntaxError: Unexpected token {

    at createScript (vm.js:80:10)

    at Object.runInNewContext (vm.js:135:10)

    at Object.$tw.utils.evalSandboxed (/usr/local/lib/node_modules/tiddlywiki/boot/boot.js:518:5)

    at Object.$tw.modules.execute (/usr/local/lib/node_modules/tiddlywiki/boot/boot.js:794:15)

    at /usr/local/lib/node_modules/tiddlywiki/boot/boot.js:834:30

    at Object.$tw.utils.each (/usr/local/lib/node_modules/tiddlywiki/boot/boot.js:135:12)

    at Object.$tw.modules.forEachModuleOfType (/usr/local/lib/node_modules/tiddlywiki/boot/boot.js:833:12)

    at Object.$tw.modules.applyMethods (/usr/local/lib/node_modules/tiddlywiki/boot/boot.js:857:14)

    at Widget.initialise ($:/core/modules/widgets/widget.js:52:48)

    at new Widget ($:/core/modules/widgets/widget.js:25:7)





------------------

(program exited with code: 1)

Press return to continue



If fixing it is too complicated, is there an easy way to "git pull" back to the penultimate version?

Jed Carty

unread,
Oct 13, 2019, 8:46:01 AM10/13/19
to TiddlyWiki
I am not sure why that is giving you an error. The only thing that I could see there is that it just has catch instead of catch (e) but that isn't giving any trouble on anything I have.
What version of node are you using? I just pushed an updated version has the (e) to GitHub. If that isn't the problem than I will need to look a bit more.

Dave

unread,
Oct 13, 2019, 11:28:32 AM10/13/19
to TiddlyWiki
Thank you Jed, that fixed it :)
Reply all
Reply to author
Forward
0 new messages