benwebber / tiddlywiki-dnd

Manage D&D campaigns with TiddlyWiki
https://benwebber.github.io/tiddlywiki-dnd/
MIT License
35 stars 8 forks source link

Labels missing when installed on Node js server #14

Closed davout1806 closed 3 years ago

davout1806 commented 3 years ago

I have TW 5.1.23 running as Node js server (node v14.16.1) on Windows 10. Does this plugin work on node js? I'm trying to determine if the issue is with the plugin or my setup.

If I install this plugin via drag, drop, import it seems to work fine (at least the spells).

If I install as detailed here and here by grabbing the code (all files and dirs under src dir) and placing it under npm\node_modules\tiddlywiki\plugins\benwebber\dnd\ and adding "benwebber/dnd" to list of plugins in tiddlywiki.info, the field labels are missing. Example below.

The only other plugins I have set for this sandbox wiki is below (although I do have other plugins in npm\node_modules\tiddlywiki\plugins for other wikis)

        "tiddlywiki/tiddlyweb",
        "tiddlywiki/filesystem",
        "tiddlywiki/highlight",

Thanks

missing-labels

benwebber commented 3 years ago

This is probably because the src/ directory contains TypeScript, not JavaScript. You'll need the compiled sources. Admittedly, I haven't tested the plugin with the Node.js server yet.

Since you have Node.js installed, you can build the project like so:

  1. Download an install Yarn.
  2. Build the plugin by running the following commands from the root of the repository:

    yarn install
    make

This will compile the TypeScript sources into JavaScript and output the entire plugin to the build/ directory. You should be able to copy the dnd folder from there and install it to your wiki.

Let me know if this works, and I'll start attaching a tarball of the build directory to each release.

davout1806 commented 3 years ago

Duh! Well that would explain it. I'll try to build this week and let you know. Thanks.

davout1806 commented 3 years ago

That worked! Thanks so much.