Error initializing noflo nodejs

373 views Asked by At

I am getting the following error while trying to setup my node.js server. I am using the latest version of noflo and node.js. Is anyone else seeing this behaviour for NoFlo on Windows?

Here is the command and error:

*C:\Users\Johan\Source\Repos\HelloNoFlow>node node_modules.bin\noflo-nodejs-init --help

C:\Users\Johan\Source\Repos\HelloNoFlow\node_modules\.bin\noflo-nodejs-init:2 basedir=`dirname "$0"`*  
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
1

There are 1 answers

1
Kenny Ki On BEST ANSWER

I believe you're following this guide - which has wrong instructions on the execution.

This works for me on Windows:

.\node_modules\.bin\noflo-nodejs-init --help"

This is because the target is a shell script instead of Javascript. Executing node <shell script> is not going to work.

Note: The same should apply to starting "noflo-nodejs".


UPDATES (19/2/17)

  1. The guide link has changed to https://docs.flowhub.io/getting-started-node
  2. I no longer work on the project that uses noflo, but I find that the script has been converted to CoffeeScript. So this workaround might not be needed anymore