Arlen22 / TiddlyServer

v2 - A static file server that can also save files and mount TiddlyWiki folders
https://arlen22.github.io/tiddlyserver/
MIT License
257 stars 36 forks source link

[v2.1.0beta] Error while accessing Tiddlywiki Folder #54

Closed mauloop closed 5 years ago

mauloop commented 5 years ago

Hi Arlen22.

I'm back again, still trying to have v2.1beta working. It seems it fails while trying to access a Tiddlywiki folder.

Here is my settings.json:

{
  "tree": {
    "$element": "group",
    "$children": {
      "NSlab": "O:\\github\\twlab\\NSlab\\wiki"
    }
  },
  "bindInfo": {
    "bindAddress": [
      "127.0.0.1"
    ],
    "filterBindAddress": false,
    "enableIPv6": false,
    "port": 27768,
    "bindWildcard": false,
    "hostLevelPermissions": {
      "localhost": {
        "mkdir": false,
        "upload": false,
        "settings": false,
        "WARNING_all_settings_WARNING": false
      },
      "*": {
        "mkdir": false,
        "upload": false,
        "settings": false,
        "WARNING_all_settings_WARNING": false
      }
    },
    "https": false,
    "_bindLocalhost": false
  },
  "logging": {
    "logColorsToFile": false,
    "logToConsoleAlso": false,
    "debugLevel": -1
  },
  "putsaver": {
    "etag": "",
    "etagWindow": 0,
    "backupDirectory": ""
  },
  "authAccounts": {},
  "directoryIndex": {
    "defaultType": "html",
    "icons": {
      "htmlfile": [
        "htm",
        "html"
      ]
    }
  },
  "EXPERIMENTAL_clientside_datafolders": {
    "enabled": false,
    "alwaysRefreshCache": true,
    "maxAge_tw_plugins": 31536000000
  },
  "authCookieAge": 2592000,
  "$schema": "./settings.schema.json"
}

And here are stdout+stderr from TiddlyServer...

... starting the server:

Settings file: K:\MK\opt64\TiddlyServer-2.1.0-beta\settings.json
$ref: keywords ignored in schema at path "#/additionalProperties"
TYPE: settings.bindInfo.https should be string
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['localhost'] should NOT have additional properties
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['localhost'] should NOT have additional properties
REQUIRED: settings.bindInfo.hostLevelPermissions['localhost'] should have required property 'writeErrors'
REQUIRED: settings.bindInfo.hostLevelPermissions['localhost'] should have required property 'websockets'
REQUIRED: settings.bindInfo.hostLevelPermissions['localhost'] should have required property 'registerNotice'
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['*'] should NOT have additional properties
ADDITIONALPROPERTIES: settings.bindInfo.hostLevelPermissions['*'] should NOT have additional properties
REQUIRED: settings.bindInfo.hostLevelPermissions['*'] should have required property 'writeErrors'
REQUIRED: settings.bindInfo.hostLevelPermissions['*'] should have required property 'websockets'
REQUIRED: settings.bindInfo.hostLevelPermissions['*'] should have required property 'registerNotice'
REQUIRED: settings.logging should have required property 'logAccess'
REQUIRED: settings.logging should have required property 'logError'
REQUIRED: settings.directoryIndex should have required property 'mixFolders'
32 32 64 16
 APP 2019-04-16 17:37:51 server 127.0.0.1 listening
Open your browser and type in one of the following:
http://127.0.0.1:27768

... opening browser on http://127.0.0.1:27768:

[2019-04-16T17:38:42.135+-200] GET     127.0.0.1       200 127.0.0.1 /                                                           27.269 ms - 5847
[2019-04-16T17:38:42.174+-200] GET     127.0.0.1       304 127.0.0.1 /directory.css                                              14.050 ms - -
[2019-04-16T17:38:42.177+-200] GET     127.0.0.1       304 127.0.0.1 /assets/icons/datafolder.png                                10.112 ms - -

... trying to open my test wiki:

[2019-04-16T17:38:57.105+-200] GET     127.0.0.1       302 127.0.0.1 /NSlab                                                      9.186 ms - -
{ Error: Cannot find module '..\..\_reference\TiddlyWiki5-Arlen22/boot/boot.js'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at loadDataFolderTiddlyWiki (K:\MK\opt64\TiddlyServer-2.1.0-beta\src\datafolder.ts:180:14)
    at a.server_types_1.obs_readFile.subscribe [as _next] (K:\MK\opt64\TiddlyServer-2.1.0-beta\src\datafolder.ts:164:4)
    at a.__tryOrUnsub (K:\MK\opt64\TiddlyServer-2.1.0-beta\lib\Rx.min.js:43:377)
    at a.next (K:\MK\opt64\TiddlyServer-2.1.0-beta\lib\Rx.min.js:42:227)
    at a._next (K:\MK\opt64\TiddlyServer-2.1.0-beta\lib\Rx.min.js:40:393)
    at a.next (K:\MK\opt64\TiddlyServer-2.1.0-beta\lib\Rx.min.js:40:64)
    at cb (K:\MK\opt64\TiddlyServer-2.1.0-beta\src\server-types.ts:820:10)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3) code: 'MODULE_NOT_FOUND' }
caught process uncaughtException

The browser waits long for the page to be loaded, with no results. I did not found errors in the browser console.

Tested with Win 10 64 bit + Chrome 73 + Node.js 10.15.3.

Thanks in advance for your help and for your patience.

Arlen22 commented 5 years ago

Ok, thanks. I fixed the problem I think. Try this release

https://github.com/Arlen22/TiddlyServer/releases/tag/v2.1.1-beta

mauloop commented 5 years ago

You succeded. V2.1.1-beta now load my test wiki with no errors. I will continue to play with this new rel, and will let you know if something will not work, but this issue can be closed.