我跟随the documentation 关于如何启动和运行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
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:意外的令牌类型 在Module._compile(module.js:439:25) at Object.Module._extensions..js(module.js:474:10) 在Module.load(module.js:356:32) 在Function.Module._load(module.js:312:12) 在Module.require(module.js:364:17) at 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) at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/bin/noflo.js:115:36 在函数。 .each。 .forEach(/ usr / local / g7 / home / tbrannon / Documents / Programming / noflo / my-noflo-example-app / node_modules / noflo / node_modules / underscore / underscore的.js:87:22) at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/bin/noflo.js:113:18 at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/lib/nodejs/ComponentLoader.js:132:16 at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/underscore/underscore.js:758:21 at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/lib/nodejs/ComponentLoader.js:152:18 at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/lib/nodejs/ComponentLoader.js:39:16 at /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) at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/lib/nodejs/ComponentLoader.js:146:22 at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:118:5 at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 at 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) at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 at 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) at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 at 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) at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 at 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) at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 at 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) at /usr/local/g7/home/tbrannon/Documents/Programming/noflo/my-noflo-example-app/node_modules/noflo/node_modules/read-installed/read-installed.js:234:14 at 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) at /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) at /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) at process._tickCallback(node.js:415:13)
tbrannon @ tbrannon0:〜/ Documents / Programming / noflo / my-noflo-example-app $
答案 0 :(得分:1)
此问题是由API change in CoffeeScript 1.7引起的。 A fix是在NoFlo的git存储库中创建的。
此修复程序包含在NoFlo 0.4.4中,可通过NPM获得。