0

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

Lulzim
  • 547
  • 4
  • 9
  • 22

2 Answers2

1

You must declare the Print component in the package.json

"noflo": {
  "components": {
     "Print": "./Print.coffee"
   }
}
Jon Nordby
  • 5,494
  • 1
  • 21
  • 50
0

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.

bergie
  • 930
  • 7
  • 8