dceejay / RedMap

A web map app for Node-RED to put blobs on
Apache License 2.0
107 stars 60 forks source link

4.2 version SyntaxError: Unexpected token '.' (line:129) #252

Closed brothercorvo closed 7 months ago

brothercorvo commented 7 months ago

Hi, the 4.2 version of the worldmap is failing. We use it in FTS webMaps

dceejay commented 7 months ago

Hi - any more info than that ? What are you sending ? any chance of an example flow that fails ?

Which version of nodejs are you running ? hopefully at least 16 or 18....

line 129 of worldmap.js is delete message.options?.pane; which uses the optional chaining operator... which has been around since node14 at least ...

brothercorvo commented 7 months ago

NodeJS version provided by Ubuntu will only run like, Node12, which NodeRed 2.3 is the latest that can run on that Node12 version.

dceejay commented 7 months ago

Don't use the one provided by Ubuntu - it is past end of service life and probably has security vulnerabilities. Even Debian (Bookworm) now has nodejs 18 in the repo. - But better to get direct from node source - https://github.com/nodesource/distributions or use our Node-RED install script which will also install nodejs... https://nodered.org/docs/getting-started/raspberrypi

I will patch that line so it may work for you - but in general going forwards you should migrate to a supported version of nodejs.

dceejay commented 7 months ago

Released as 4.2.1

brothercorvo commented 7 months ago

thank you so much for the quick fix @dceejay. we are looking forward to fix that