Syntax Error while installing new Nodes

#1

Hello, I´m having some trouble with my Node-RED.

Node-RED [v0.16.2 ]
nodejs [v6.12.3 ]
Hardware/OS [Siemens IoT Gateway 2040, Yocto Linux ]
Browser [Chrome ]

I installed the node-red-contrib-s7comm palette and received the following error:

15 Oct 08:19:05 - [info] Installing module: node-red-contrib-s7comm
15 Oct 08:20:31 - [info] Installed module: node-red-contrib-s7comm
15 Oct 08:20:32 - [info] Added node types:
15 Oct 08:20:32 - [info] - node-red-contrib-s7comm:s7comm read : SyntaxError: Unexpected token )
15 Oct 08:20:32 - [info] - node-red-contrib-s7comm:s7comm write : SyntaxError: Unexpected token )
15 Oct 08:20:32 - [info] - node-red-contrib-s7comm:s7comm : SyntaxError: Unexpected token )

I have already searched in the s7comm.js file for incorrect syntax, but I don´t know if this is the right place to search for the error? How can I locate the exact file?

Wenn I try to use the new nodes, I get this error...

15 Oct 08:24:26 - [info] Waiting for missing types to be registered:
15 Oct 08:24:26 - [info] - s7comm read
15 Oct 08:24:26 - [info] - s7comm write
15 Oct 08:24:45 - [info] Stopping flows
15 Oct 08:24:45 - [info] Stopped flows
15 Oct 08:24:45 - [info] Waiting for missing types to be registered:
15 Oct 08:24:45 - [info] - s7comm
15 Oct 08:24:45 - [info] - s7comm read
15 Oct 08:24:45 - [info] - s7comm write

Whats does this mean? Does this have anything to do with the other error?

#2

Hi - as I said on the issue you raised, I suspect this is due to the version of Node.js. I think that module requires node 8 and you have node 6. You will need to update your node.js version to use that module.

#3

Hi, I tried to do this. The IoT Gateway can´t update to newer versions of node.js. I already looked in the Siemens IoT Gateway forums for a way to update.. but I will continue to look for a way to update.

Is there a way to find out which file throws the syntax error? So that I cann look through the code and correct it for this special using case?

#4

If you look the module up on flows.nodered.org you'll see the link to its github repo. From there, you'll see it only has one .js file - https://github.com/Hilscher/node-red-contrib-s7comm/blob/master/s7comm.js

Nick

#5

Thanks for your advice, I will try it this way.

#6

Is suspect it is the same cause for their Issues 4 and 5 - https://github.com/Hilscher/node-red-contrib-s7comm/issues/
So if you manage to fix it several people would very much appreciate it.

#7

I pulled the git repository, made a new branch, cherry picked an old version of the .js file and changed some lines. Thats working for me an my Gateway.

I´m going to fork the repository and link it there.

#8

Hello, I also have problems with node-red on the Siemens IOT

Node-RED [v0.19.6 ]
nodejs [v6.8.0 ]
Hardware/OS [Siemens IoT Gateway 2040, Yocto Linux v2.2.0 ]

If the s7comm node requires a more recent version of Nodejs, I do not know how to update it.
Can anybody help me further?