ts.startsWith is not a function

Hello to all!!
I yesterday updated MQTT to Version 2.0.10 ,, so far averything was working fine.
To day i updated all packages in Node-RED marked with update / newer version.
After a reboot, Node-RED won't start anymore .. all is running in a pi 4 ..
The Error wil lshow up if node_RED try to start:

6 Apr 10:26:32 - [info] Started flows
6 Apr 10:26:32 - [info] [mqtt-broker:MyMQTT] Connected to broker: mqtt://192.168.11.116:1883
6 Apr 10:26:32 - [red] Uncaught Exception:
6 Apr 10:26:32 - TypeError: ts.startsWith is not a function
    at matchTopic (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:38:20)
    at MqttClient.handler (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:319:25)
    at MqttClient.emit (events.js:326:22)
    at MqttClient._handlePublish (/usr/lib/node_modules/node-red/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/usr/lib/node_modules/node-red/node_modules/mqtt/lib/client.js:410:12)
    at work (/usr/lib/node_modules/node-red/node_modules/mqtt/lib/client.js:321:12)
    at processTicksAndRejections (internal/process/task_queues.js:79:11)

any other run into this problem and know what to do??
Thnaks for any help:

Mark

What version of node-red and nodejs is on the PI4?

I presume you mean that you upgraded Mosquitto.

Version!!
6 Apr 10:26:29 - [info] Node-RED version: v1.2.9
6 Apr 10:26:29 - [info] Node.js version: v12.22.0
6 Apr 10:26:29 - [info] Linux 5.10.23-v7l+ arm LE
6 Apr 10:26:30 - [info] Loading palette nodes
6 Apr 10:26:32 - [info] Dashboard version 2.28.2 started at /ui
6 Apr 10:26:32 - [info] Settings file : /home/pi/.node-red/settings.js
6 Apr 10:26:32 - [info] Context store : 'default' [module=memory]
6 Apr 10:26:32 - [info] User directory : /home/pi/.node-red
6 Apr 10:26:32 - [info] Server now running at http://127.0.0.1:1880/
6 Apr 10:26:32 - [info] Active project : Aichacher
6 Apr 10:26:32 - [info] Flows file : /home/pi/.node-red/projects/Aichacher/flow.json
6 Apr 10:26:32 - [info] Starting flows
6 Apr 10:26:32 - [info] Started flows
6 Apr 10:26:32 - [info] [mqtt-broker:MyMQTT] Connected to broker: mqtt://192.168.11.116:1883
6 Apr 10:26:32 - [red] Uncaught Exception:
6 Apr 10:26:32 - TypeError: ts.startsWith is not a function
at matchTopic (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/10-mqtt.js:38:20)

mosquitto version 2.0.10

Are you trying to subscribe to an empty or null topic possibly?

didn't change anything .. just updated the "Nodes" .. I have been told to do so!! Nothing else!!

What nodes did you update?

Have you tried a reboot?

1 Like

that was about ten "Nodes" marked as to be updated .. tryied everything . LOTS of reboot etc. same error

  • node-red-contrib-tasmota
  • node-red-contrib-ui-artless-gauge
  • node-red-contrib-ui-led
  • node-red-dashboard
  • node-red-node-pi-gpio
  • node-red-node-ping
  • node-red-node-random
  • node-red-node-serialport
  • node-red-node-tail

It is very odd, so clutching at straws a bit here. What do these command show, executed from your .node-red folder
npm list mqtt
npm list -g mqtt

It seems it is a tasmota node problem, see Problem after update to 0.9.8 · Issue #26 · DaveMDS/node-red-contrib-tasmota · GitHub
Apparently there has been a new release but I suggest reading the thread as it seems you may have other changes to make to get it going again.

Personally I don't use those nodes for Tasmota devices, I just use mosquitto and go through MQTT directly.

fount it ...
the new version of: * node-red-contrib-tasmota
need's a own Tasmota-MQTT-Broker .. as mentioned from Colin .. Thanks
Mark