node.js questions...

93 views
Skip to first unread message

Steven Schneider

unread,
Aug 15, 2017, 11:29:07 AM8/15/17
to TiddlyWiki
Hello folks,

I'm trying to figure out node.js. 

Right now, I"m trying to build a new wiki from empty and add a few tiddlers, by running a bash script. My script has this line:

tiddlywiki new --verbose --init empty --load new-tiddlers.json --build index

My intentions are to (1) create a new empty wiki in the /new subdirectory of the current directory   (2) load a few tiddlers from a json file and (3) create a new index.html file in the default output directory.

I get this response (below), which indicates to me that the init and the load work, but the build does not.

Thanks!

//steve.



Boot log:

  Startup task: load-modules

  Startup task: info after: load-modules before: startup

  Startup task: startup after: load-modules

  Startup task: story after: startup

  Startup task: commands platforms: node after: story

Executing command: init empty

Copied edition 'empty' to new

Executing command: load new-tiddlers.json

Executing command: build index


$:/core/modules/commands/build.js:27

var buildTargets = $tw.boot.wikiInfo.build;

                                    ^

TypeError: Cannot read property 'build' of null

    at Command.execute ($:/core/modules/commands/build.js:27:38)

    at Commander.executeNextCommand ($:/core/modules/commander.js:100:14)

    at Command.callback ($:/core/modules/commander.js:112:13)

    at Command.execute ($:/core/modules/commands/load.js:46:8)

    at Commander.executeNextCommand ($:/core/modules/commander.js:115:14)

    at Commander.executeNextCommand ($:/core/modules/commander.js:104:12)

    at Commander.executeNextCommand ($:/core/modules/commander.js:104:12)

    at Commander.execute ($:/core/modules/commander.js:64:7)

    at Object.exports.startup ($:/core/modules/startup/commands.js:34:12)

    at $tw.boot.executeNextStartupTask (/usr/local/lib/node_modules/tiddlywiki/boot/boot.js:2069:10)


Jeremy Ruston

unread,
Aug 15, 2017, 11:32:18 AM8/15/17
to tiddl...@googlegroups.com
Hi Steve

On 15 Aug 2017, at 16:29, Steven Schneider <st...@sunyit.edu> wrote:

Right now, I"m trying to build a new wiki from empty and add a few tiddlers, by running a bash script. My script has this line:

tiddlywiki new --verbose --init empty --load new-tiddlers.json --build index

It’s probably a bug that you don’t receive a warning, but you need to perform the init as a separate command:

tiddlywiki new --verbose --init empty
tiddlywiki new --verbose --load new-tiddlers.json --build index

It’s only when the second command starts up that it is able to read the initialisation information stored by the —init command.

Best wishes

Jeremy

Steven Schneider

unread,
Aug 15, 2017, 2:05:14 PM8/15/17
to tiddl...@googlegroups.com
oh! ok! thanks Jeremy.

I didn't know I could run a series of commands like that in a shell file, so that's a bonus :)

//steve.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/T_xbYVTKb1k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CC4728A3-CFBC-4B24-8C76-E170ADAB5FA7%40gmail.com.

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



--
Steven M. Schneider
SUNY Polytechnic Institute (formerly, SUNYIT)  | http://www.sunyit.edu
Professor, Department of Communication & Humanities
Reply all
Reply to author
Forward
0 new messages