Search code examples
noflo

Noflo I get error when trying to print an input


I have app.js that looks like:

var noflo  = require("noflo");
var graph = noflo.graph.createGraph("PrintValueGraph");
graph.addNode("output", "Print");
graph.addInitial(100,"output","in");
var network = noflo.createNetwork(graph);

And I have a Print.coffee script in the same dir, that has the same code as Output.coffee on the noflo-core folder.

I get the error: no process defined for inbound node output.

Do u have any idea, what the problem is? Thanks


Solution

  • Components need to be registered in the package.json (or component.json for the browser) for the NoFlo ComponentLoader to find them.

    See example: https://github.com/c-base/ingress-table/blob/master/package.json#L41

    There is also the grunt-noflo-manifest package that can automate this for you.

    The convention is to keep your components in a components/ subdirectory inside your project.