What version of Node-RED have you got on the Pi? Also what version of node.js (run node -v
to find out).
If you're on the preinstalled version, you'll probably want to use our install script to get things upgraded to the latest stable versions - https://nodered.org/docs/getting-started/raspberrypi#installing-and-upgrading-node-red