More problems with dev environment on node...

59 views
Skip to first unread message

stefano franchi

unread,
Feb 4, 2019, 2:01:04 PM2/4/19
to tiddly...@googlegroups.com


I'm encountering more troubles getting a demo wiki to work after setting up the node/tiddlywiki as recommended. Two issues:

1. I cloned the TW5 repo from github into a local dir under my home dir and modified the tw5.com tiddlywiki.info file as per on the devs site. I also have a global version of the tiddlywiki source code installed in /usr/lib. I cannot seem to find a way to convince the tiddlywiki executable to look into the local version of the "editions" folder. It always uses the global file in /ur/lib. If I try to pass the full path to the local version of tw5.com to the tiddlywiki --init command, it always complains that the file cannot be found.

2. If I do try to install a server version based on the global tw.com templates, I end up being unable to start the server, because tiddlywiki stops booting process complaining it cannot find the ca-ES.tid file. Unsurprisingly so, since it looks for it in the wrong place, using a relative path that leads it astray. Using the path-prefix options does not seem to have any effect.

This is very frustrating.  I must be approaching what I I thought would be a relatively  simple task the wrong way, . Either that or I am really dumb.

Any suggestions?


Cheers,

Stefano
--
__________________________________________________
Stefano Franchi

stefano...@gmail.com
http://stefano.cleinias.org

Brian Theado

unread,
Feb 4, 2019, 10:34:51 PM2/4/19
to tiddly...@googlegroups.com
These steps work for me. If they work for you, maybe it can help you track down your issue:

1. mkdir simple-tw-npm-test
2. cd simple-tw-npm-test
# Ignore warnings here about missing package.json
3. npm install tiddlywiki
4. $(npm bin)/tiddlywiki wiki --init server
5. $(npm bin)/tiddlywiki wiki --listen
6. visit http://127.0.0.1:8080 in your browser

The tiddlers will be stored in the relative folder named 'wiki'

BTW, '$(npm bin)' syntax in #4 and #5 is for bash. If you aren't using Linux or Mac, then likely you aren't using bash. If that's the case, then run the 'npm bin' command by itself and replace the '$(npm bin)' above with the output you see. Also if you are on windows I guess you would need to replace the forward slash with back slash.

Now after typing this, I just realized it should be documented already and I find it is: https://tiddlywiki.com/#Installing%20TiddlyWiki%20on%20Node.js. Are these the instructions you are already following?

Brian

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/CAJODLwaGVU2pFTRVy553Xg45Y-c3pNQvqHp2n2L%2BgC%3Dogk9y5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

stefano franchi

unread,
Feb 4, 2019, 11:42:04 PM2/4/19
to tiddly...@googlegroups.com
On Mon, Feb 4, 2019 at 9:34 PM Brian Theado <brian....@gmail.com> wrote:
These steps work for me. If they work for you, maybe it can help you track down your issue:

1. mkdir simple-tw-npm-test
2. cd simple-tw-npm-test
# Ignore warnings here about missing package.json
3. npm install tiddlywiki
4. $(npm bin)/tiddlywiki wiki --init server
5. $(npm bin)/tiddlywiki wiki --listen
6. visit http://127.0.0.1:8080 in your browser

The tiddlers will be stored in the relative folder named 'wiki'

BTW, '$(npm bin)' syntax in #4 and #5 is for bash. If you aren't using Linux or Mac, then likely you aren't using bash. If that's the case, then run the 'npm bin' command by itself and replace the '$(npm bin)' above with the output you see. Also if you are on windows I guess you would need to replace the forward slash with back slash.

Now after typing this, I just realized it should be documented already and I find it is: https://tiddlywiki.com/#Installing%20TiddlyWiki%20on%20Node.js. Are these the instructions you are already following?


Those were indeed the instructions I found first. But on the dev site, at https://tiddlywiki.com/dev/#Developing%20plugins%20using%20Node.js%20and%20GitHub, the instructions are different. They tell you to clone the github repo, and install the tw5.com edition, not the barebone server one.  This is what fails, and twice,  as I described in my post. First it fails to install the locally  modified TW5.com edition, and then it fails to boot  because it has the wrong path for the language tiddlers (and perhaps it would fail for other paths as well, but  boot.js crashes).

Regardless, I gave up on installing tw5.com and and now focusing on the barebone server edition. The next obstacle is how to convice tiddlywiki to recognize a plugin written externally (i.e. directly as a .js file in an external editor). There appears to be some magic that escapes me.

Cheers,

Stefano

BTW, I am indeed on linux and using the bash shell

--

stefano franchi

unread,
Feb 4, 2019, 11:46:29 PM2/4/19
to tiddly...@googlegroups.com
BTW, I must say tiddlywiki reminds me of the Smalltalk environment (not the language, the system). Beautiful and super-powerful, but it would quickly turn into a nightmare as soon as you tried to interface it with the external world, be it source control systems, editors, libraries, or what have you.
I hope I am wrong, as the Smalltalk story did not end well.
S.
--
__________________________________________________

Jeremy Ruston

unread,
Feb 5, 2019, 10:27:49 AM2/5/19
to TiddlyWikiDev
Hi Stefan

Those were indeed the instructions I found first. But on the dev site, at https://tiddlywiki.com/dev/#Developing%20plugins%20using%20Node.js%20and%20GitHub, the instructions are different.

Those instructions are for plugin development. They are focussed on adding the plugin to the TW5 repo because that’s what you’d need to do if you planned to submit the plugin as a PR to the core. We should probably add an update with instructions for working on a plugin within an independent repo.

You can see plugins in their raw state in the plugins folder of the TW5 repo. You can also add a “plugins” folder to your wiki folder (alongside the tiddlywiki.info file), and within that plugins folder have any number of named plugin folders (ie, the plugin folders will be something like mywiki/plugins/myplugin/plugin.info).

They tell you to clone the github repo, and install the tw5.com edition, not the barebone server one.  This is what fails, and twice,  as I described in my post. First it fails to install the locally  modified TW5.com edition, and then it fails to boot  because it has the wrong path for the language tiddlers (and perhaps it would fail for other paths as well, but  boot.js crashes).

The first problem in your OP seems to be a problem with the shell finding the right copy of TW, perhaps a problem with the PATH environment variable?


Regardless, I gave up on installing tw5.com and and now focusing on the barebone server edition. The next obstacle is how to convice tiddlywiki to recognize a plugin written externally (i.e. directly as a .js file in an external editor). There appears to be some magic that escapes me.

See the notes above.

Best wishes

Jeremy


Cheers,

Stefano

BTW, I am indeed on linux and using the bash shell

--

-- 
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.

stefano franchi

unread,
Feb 5, 2019, 5:55:53 PM2/5/19
to tiddly...@googlegroups.com
Hi Jeremy,

thanks for your reply. Indeed, I had figured out my wrong approach exactly along the lines you sketch in your message.  I was about to write down an addendum on "How to develop a plugin with Node and TW5 in your own repo" for possible inclusion in the docs when I got your message.

Here is what I did, for future ref:

1. Blank slate: erased the local copy of the TW5, plugins folder, and son on.

2. Installed tiddlywiki with my distribution's  package manager
 (pacman, as I am on Archlinux)

3. Created a local barebones tiddlywiki server edition with the usual --init server command

4. Added a plugins/myplugin folder to the newly created, personal tiddlywiki

5. Created a plugin.info file and a skeletal myplugin.js plugin into that folder

6. Added "plugins/myplugin" to the tiddlywiki.info file in the local tiddlywiki root

7. Added Github repos for the plugin and external library

pretty much you suggested...



For more options, visit https://groups.google.com/d/optout.


--
__________________________________________________
Reply all
Reply to author
Forward
0 new messages