OokTech / TW5-Gatekeeper

A plugin that pushes changes from the filesystem to the wiki in TiddlyWik5
7 stars 0 forks source link

Unable to start, $tw.Gatekeeper not initialized #1

Open tengl opened 6 years ago

tengl commented 6 years ago

Hi,

Promising project. I will follow with interest. I tried it locally and encountered an error, see below. I haven't looked at how plugins are loaded in tiddlywiki yet, but it seems it loads the files in the wrong order. Or perhaps you should initialize $tw.Gatekeeper in all files.

I'm running Windows 10 and PowerShell (or Git Bash).

C:\Users\xxx\AppData\Roaming\npm\node_modules\tiddlywiki> node ./tiddlywiki.js editions/GatekeeperDemo/ --server 8080 "`$:/core/save/lazy-images" "text/plain" "text/html"
 "" "" 0.0.0.0
Error executing boot module $:/plugins/OokTech/Gatekeeper/filesystemfunctions.js: {}

$:/plugins/OokTech/Gatekeeper/filesystemfunctions.js:21
  $tw.Gatekeeper.FileSystemFunctions = $tw.Gatekeeper.FileSystemFunctions || {};
tengl commented 6 years ago

Just tested your other repo, TW-MultiUser and the same problem. I added

$tw.MultiUser = $tw.MultiUser || {};

to filesystemfunctions.js and now it works. Nice job.