To be clear: I need Node because I want to use NPM modules.

2019. július 11., csütörtök 11:34:31 UTC+2 időpontban bimlas a következőt 
írta:
>
> Dear all,
>
> In a Node.js Javascript project, I want to use TiddlyWiki to display data.
>
> To run Node methods, I need to create modules with "module-type: 
> utils-node" (if I understand it well), thus I can reach them through 
> $tw.utils. These will only be loaded by TiddlyWiki if $:/info/node is "yes" 
> (so the value of $tw.node is not null). I have several Node wiki, checked 
> in each (in the browser), but it seems that nowhere does it detects that 
> the wiki is running under Node, because viewing $:/info/node in the browser 
> says "no".
>
> I'm confused, because if I check in the code, it detects that it is 
> running under Node.
>
> $tw.boot.argv = ['myproject', '--listen'];
> $tw.boot.boot();
>
>
> console.log($tw.node);
> // {}
> console.log($tw.wiki.getTiddlerText('$:/info/node'));
> // yes
>
> If I create a widget that uses this Node module, it doesn't work in the 
> browser, instead of the widget, RSOD appears: $tw.utils.myNodeFunction is 
> not a function
>
> My question is how can I use the Node module in the browser?
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/3e0d6bc9-86c3-443c-8146-81acc7c98809%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to