-1

我正在关注 有关如何启动和运行 NoFlo的文档。就在“定义你的第一个图表”部分之前,有一行说我可以通过键入来查看已安装组件的列表

$ ./node_modules/.bin/noflo list .

但是,这样做会导致下面的堆栈回溯。noflo 讨厌的程序的前几行是:

if typeof process isnt 'undefined' and process.execPath and process.execPath.indexOf('node') isnt -1
  noflo = require "../../lib/NoFlo"
else
  noflo = require '../lib/NoFlo'

class Graph extends noflo.Component
  constructor: ->
    @network = null
    @ready = true
    @started = false
    @baseDir = null
    @loader = null

shell会话的记录如下

tbrannon@tbrannon0:~/Documents/Programming/noflo/my-noflo-example-app$ ./node_modules/.bin/noflo list 。

/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/src/components/Graph.coffee:1(函数(exports,require,module,__filename,__dirname ) { if typeof proces ^^^^^^ SyntaxError: Unexpected token typeof at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module。加载 (module.js:356:32) 在 Function.Module._load (module.js:312:12) 在 Module.require (module.js:364:17) 在 require (module.js:380:17) 在ComponentLoader.load (/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/lib/ComponentLoader.js:127:26) 在/usr/local/g7 /home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/bin/noflo.js:115:36 在功能。。每个。.forEach (/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/underscore/underscore.js:87:22) 在/usr/local/ g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/bin/noflo.js:113:18 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo /my-noflo-example-app/node_modules/noflo/lib/nodejs/ComponentLoader.js:132:16 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/ node_modules/noflo/node_modules/underscore/underscore.js:758:21 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/lib/nodejs/ComponentLoader .js:152:18 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/lib/nodejs/ComponentLoader.js:39:16 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/underscore/underscore.js:758:21 在 ComponentLoader.getModuleComponents (/usr/ local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/lib/nodejs/ComponentLoader.js:61:16) 在 /usr/local/g7/home/tbrannon/文档/Programming/noflo/my-noflo-example-app/node_modules/noflo/lib/nodejs/ComponentLoader.js:146:22 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo -example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:118:5 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/ node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 在 cb (/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/node_modules/slide/lib/async-map.js :48:11) 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14在 cb (/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/node_modules/slide/lib/async-map.js: 48:11)在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 在cb (/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/node_modules/slide/lib/async-map.js:48 :11) 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 在 cb ( /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/node_modules/slide/lib/async-map.js:48:11 ) 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 在 cb (/ usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/node_modules/slide/lib/async-map.js:48:11)在/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 在 cb (/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/node_modules/slide/lib/async-map.js :48:11) 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14在 asyncMap (/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/node_modules/slide/lib/async-map.js: 27:18)接下来(/usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:200: 5) 在 /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:157:7 在 LOOP ( fs.js:1356:14) 在 process._tickCallback (node.js:415:13)

tbrannon@tbrannon0:~/Documents/Programming/noflo/my-noflo-example-app$

4

1 回答 1

1

此问题是由CoffeeScript 1.7 中的 API 更改引起的。在 NoFlo 的 git 存储库中进行了修复。

该修复程序包含在可通过 NPM 获得的NoFlo 0.4.4中。

于 2014-02-04T16:58:36.017 回答