noflo / noflo-nodejs

Command-line tool for running NoFlo programs on Node.js
91 stars 36 forks source link

fbpGraph.graph.loadFile is not a function #417

Closed linonetwo closed 1 year ago

linonetwo commented 1 year ago

From doc https://noflojs.org/documentation

# In the graph we first need to define the nodes and the connections between them
Read(filesystem/ReadFile) OUT -> IN Display(core/Output)

# Start off the graph by sending a filename to the file reader
'package.json' -> IN Read
$ ./node_modules/.bin/noflo-nodejs --graph scripts/ShowContents.fbp --batch

图片

PS E:\repo\TiddlyGit-Desktop> ./node_modules/.bin/noflo-nodejs --graph scripts/ShowContents.fbp --batch
fbpGraph.graph.loadFile is not a function
TypeError: fbpGraph.graph.loadFile is not a function
    at exports.loadGraph (E:\repo\TiddlyGit-Desktop\node_modules\.pnpm\noflo-nodejs@0.15.2\node_modules\noflo-nodejs\src\runtime.js:16:25)
    at exports.startGraph (E:\repo\TiddlyGit-Desktop\node_modules\.pnpm\noflo-nodejs@0.15.2\node_modules\noflo-nodejs\src\runtime.js:20:4)
    at E:\repo\TiddlyGit-Desktop\node_modules\.pnpm\noflo-nodejs@0.15.2\node_modules\noflo-nodejs\src\noflo-nodejs.js:11:29

Try add console.log there

fbpGraph.graph {
  Graph: [class Graph extends EventEmitter],
  createGraph: [Function: createGraph],
  loadJSON: [Function: loadJSON],
  loadFBP: [Function: loadFBP],
  loadFile: undefined,
  equivalent: [Function: equivalent],
  mergeResolveTheirs: [Function: mergeResolveTheirsNaive]        
}
linonetwo commented 1 year ago

Sorry, I delete it manually in https://github.com/flowbased/fbp-graph/issues/375 and pnpm will reuse it across whole PC.

Oh, I delete it using pnpm patch, so it works in browser.