Arlen22 / TiddlyServer

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

Getting started. How to solve "caught process uncaughtException 'The settings file is v2.0 and must be upgraded.'" ? #98

Open harisund opened 4 years ago

harisund commented 4 years ago

These is what I run. Any idea what I am doing wrong? I am literally following the instructions in the main README.

$ npm init -y
$ npm install tiddlyserver --save-exact

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN tiddly@1.0.0 No description
npm WARN tiddly@1.0.0 No repository field.

+ tiddlyserver@2.2.0-alpha-7
added 3 packages from 2 contributors and audited 3 packages in 1.05s
found 0 vulnerabilities

$ cat settings.json
{
    "tree": "./webroot",
    "bindInfo": {
    "bindWildcard": true
    }
}

$ npx tiddlyserver --config settings.json
   [ERROR] 2020-07-24 15:50:10 caught process uncaughtException 'The settings file is v2.0 and must be upgraded.'
Arlen22 commented 4 years ago

You need to add the $schema key. The value can just be the string "true".

If you run npx tiddlyserver --gen-schema settings.schema.json and then set the $schema key to that file, certain code editors will give you intellisense. It's a bit hacky but should work. That part is optional though.