2017-08-10 13 views
0

下面是flow.jsonNoFlo instance.isReady不是一個函數

 
{ 
    "id": "04211388-4ea7-4999-9fd1-3b793283fcbf", 
    "user": "******", 
    "host": "autodetect", 
    "port": 3569, 
    "label": "my-runtime", 
    "secret": "***", 
    "permissions": { 
    "***": [ 
     "protocol:component", 
     "protocol:runtime", 
     "protocol:graph", 
     "protocol:network", 
     "component:getsource", 
     "component:setsource" 
    ] 
    }, 
    "properties": { 
     "name": "HTTP GET Client Demo", 
     "id": "04211388-4ea7-4999-9fd1-***", 
     "user": "af4e9e59-539b-4ea0-b683-***", 
     "environment": { 
     "type": "noflo-nodejs" 
     } 
    }, 
    "inports": {}, 
    "outports": {}, 
    "groups": [], 
    "processes": { 
     "SendRequest": { 
     "component": "http/SendRequest", 
     "metadata": { 
      "label": "SendRequest", 
      "x": 360, 
      "y": 216, 
      "width": 72, 
      "height": 72 
     } 
     }, 
     "ReceiveResponse": { 
     "component": "http/ReceiveResponse", 
     "metadata": { 
      "label": "ReceiveResponse", 
      "x": 504, 
      "y": 216, 
      "width": 72, 
      "height": 72 
     } 
     }, 
     "core/Repeat_2iq0o": { 
     "component": "core/Repeat", 
     "metadata": { 
      "label": "core/Repeat", 
      "x": 216, 
      "y": 216, 
      "width": 72, 
      "height": 72 
     } 
     }, 
     "core/Output_av11k": { 
     "component": "core/Output", 
     "metadata": { 
      "label": "core/Output", 
      "x": 648, 
      "y": 216, 
      "width": 72, 
      "height": 72 
     } 
     } 
    }, 
    "connections": [ 
     { 
     "src": { 
      "process": "core/Repeat_2iq0o", 
      "port": "out" 
     }, 
     "tgt": { 
      "process": "SendRequest", 
      "port": "url" 
     }, 
     "metadata": { 
      "route": 4 
     } 
     }, 
     { 
     "src": { 
      "process": "core/Repeat_2iq0o", 
      "port": "out" 
     }, 
     "tgt": { 
      "process": "SendRequest", 
      "port": "start" 
     }, 
     "metadata": { 
      "route": 3 
     } 
     }, 
     { 
     "src": { 
      "process": "SendRequest", 
      "port": "request" 
     }, 
     "tgt": { 
      "process": "ReceiveResponse", 
      "port": "request" 
     }, 
     "metadata": { 
      "route": 4 
     } 
     }, 
     { 
     "src": { 
      "process": "ReceiveResponse", 
      "port": "enter code here message" 
     }, 
     "tgt"`enter code here`: { 
      "process": "core/Output_av11k", 
      "port": "in"`enter code here` 
     }, 
     "metadata": { 
      "route": 7 
     } 
     }, 
     { 
     "data": "https://httpbin.org/get", 
     "tgt": { 
      "process": "core/Repeat_2iq0o", 
      "port": "in" 
     } 
     } 
    ] 
} 

下面是錯誤代碼

<pre> 
TypeError: instance.isReady is not a function 
    at /home/atif/WorkSpace/NoFLowProjects/noflo/node_modules/noflo-runtime-base/protocol/Component.js:133:25 
    at /home/atif/WorkSpace/NoFLowProjects/noflo/node_modules/noflo/lib/ComponentLoader.js:133:18 
    at Object.exports.dynamicLoad (/home/atif/WorkSpace/NoFLowProjects/noflo/node_modules/noflo/lib/loader/NodeJs.js:197:12) 
    at ComponentLoader.createComponent (/home/atif/WorkSpace/NoFLowProjects/noflo/node_modules/noflo/lib/ComponentLoader.js:146:26) 
    at ComponentLoader.load (/home/atif/WorkSpace/NoFLowProjects/noflo/node_modules/noflo/lib/ComponentLoader.js:117:19) 
    at ComponentProtocol.processComponent (/home/atif/WorkSpace/NoFLowProjects/noflo/node_modules/noflo-runtime-base/protocol/Component.js:124:21) 
    at /home/atif/WorkSpace/NoFLowProjects/noflo/node_modules/noflo-runtime-base/protocol/Component.js:66:26 
    at Array.forEach (native)`enter code here` 

</pre> 

回答

0

這聽起來像你想的組件加載不會返回有效的組件實例(使用noflo.Component基類)。

如果您的圖只包含http/SendRequest,那麼該組件的實現可能是問題。

看着noflo-http,它是硬編碼依賴於一個相當古老的NoFlo版本,所以可能需要更新。