Warning using folder for plugin installation on Node.js version

I am playing around with the node.js version and trying to wrap my head around the plugin installation process. So far I have git cloned 2 repos and moved the contents of their plugin folders to the plugins folder in my wiki folder it looks as follows

The first part of my tiddlywiki.info file reads

    "description": "Basic client-server edition",
    "plugins": [

When I start the tiddlywiki server I get the following warning:

Warning: Cannot find plugin 'flibbles/relink'
Warning: Cannot find plugin 'EvidentlyCube/AutoComplete'

But I can use the plugins. Am I doing something wrong?

You installed the plugins into your local server instance, so you don’t need to reference them in your tiddlywiki.info file. If you wanted relink and autocomplete to be available for other instances without having to copy the directories every time, then you could have installed them into your global TW code.

If you installed TW globally, when you start up node tiddlywiki, node will use it’s own copy of tiddlywiki to find plugins and create your TW instance. Where is this local library located? It’s going to depend on your system. If you give the command

npm list -g

You should see a list of your node installations. It should also show a path to the base library of your node installations. If you change into that directory, and then go down to node_modules/tiddlywiki, you’ll see the root of the systems TW copy, including the plugin directory. That directory is where you could put flibbles/relink, for instance. However, it might get overwritten the next time you upgrade TW. So you might instead want to put your own library of plugins somewhere else, and reference them with environmental variables. See

Environmental Variables on Node.js

1 Like

Thank you! I did try the environment variable way as well but messed up the folder structure. I figured it out now and wrote an updater script in case anyone is interested. It assumes that there is a repos folder in TIDDLYWIKI_PLUGIN_DIR containing git repos with TW plugins. It depends on the jq utility for reading the plugin.info file but should otherwise run on bash/zsh.

## Go to TW plugin path
cd ${base_dir}

## Update git repositories
all_repos=$(ls repos)
for r in $all_repos; do
        cd "repos/${r}"
        git pull
        cd ${base_dir};

## Move plugins to correct folder
all_plugs=$(find repos -name "plugin.info" | xargs dirname)
for d in $all_plugs; do
        curTiddler=$(cat ${d}/plugin.info | jq ".title")
        mkdir -p "${curTitle}"
        cp -r "${d}/"* "${curTitle}"
        echo $curTitle;