Can't update or add nodes

hi for some reason i cant update or add new nodes i just get the message

2023-08-08T18:56:16.282Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict @korve/node-red-convert-unit@0.0.2
2023-08-08T18:56:17.214Z [err] npm
2023-08-08T18:56:17.215Z [err]  WARN
2023-08-08T18:56:17.215Z [err]  config production Use `--omit=dev` instead.
2023-08-08T18:56:18.650Z [err] npm
2023-08-08T18:56:18.651Z [err]  
2023-08-08T18:56:18.651Z [err] ERR!
2023-08-08T18:56:18.651Z [err]  Cannot read properties of undefined (reading 'isStream')
2023-08-08T18:56:18.656Z [err] 
2023-08-08T18:56:18.658Z [err] npm
2023-08-08T18:56:18.658Z [err]  
2023-08-08T18:56:18.658Z [err] ERR!
2023-08-08T18:56:18.658Z [err]  A complete log of this run can be found in: /home/pi/.npm/_logs/2023-08-08T18_56_17_146Z-debug-0.log
2023-08-08T18:56:18.671Z rc=1

any help would be great thanks 
  1. Were you doing the install from a terminal window or using the NR palette manager?
  2. it in a terminal , what directory were you in when you issued the command?
  3. why didn't you use the recommended install command
    npm install @korve/node-red-convert-unit
  4. what version of NR and node.js
  5. and you using one Assistant or Docker?
1 Like

hi i was trying from the palette manager then tried from the pi
when i try (npm install @korve/node-red-convert-unit) on pi i get

pi@raspberrypi:~ $ npm install @korve/node-red-convert-unit
npm ERR! Cannot read properties of undefined (reading 'isStream')

npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-08-08T19_23_49_113Z-debug-0.log
pi@raspberrypi:~ $ 
node version v18.17.0
npm version 9.6.7
as for one assistant or docker dont think so

Is it just that node that you cannot install or do you get that when trying to install anything?

When installing manually you must first go into your .node-red folder. That is probably not the cause of the problem though.

Try this command (from your .node-red folder)
npm cache clean –force
then try the install again.

If still not installing, then to make sure your system is up to date, run
sudo apt update && sudo apt full-upgrade
If any errors then show us. If not then try the install again.

If still no joy, what does
apt policy nodejs

1 Like

tried with no luck
apt policy nodejs says

pi@raspberrypi:/usr/lib/node_modules/node-red $ apt policy nodejs
  Installed: 18.17.0-deb-1nodesource1
  Candidate: 18.17.0-deb-1nodesource1
  Version table:
 *** 18.17.0-deb-1nodesource1 500
        500 bullseye/main armhf Packages
        100 /var/lib/dpkg/status
     12.22.12~dfsg-1~deb11u4 500
        500 bullseye/main armhf Packages
pi@raspberrypi:/usr/lib/node_modules/node-red $ 

cant install any nodes

As a matter of interest, why did you go into that folder to run that? It doesn't make any difference for that command, but I just want to make sure you did not think I meant that folder for manually installing.

Were you previously able to install nodes? If so did you do anything that might have triggered the problem? Updated nodejs for example. Had a sudden power down? Is the system mis-behaving in any other way?

Can you show us the node-red startup log please. It probably won't help, but I am running out of ideas. You can see that by running


Copy/paste the text please rather than screenshot.

You could try re-installing nodejs
sudo apt remove --purge nodejs
sudo apt install nodejs

1 Like

hi its been a while since i installed any nodes ,
i tried sudo apt remove --purge nodejs
sudo apt install nodejs
made no diference unfortunately.
still cant install nodes,
is it worth removing node red and rinstalling,
the startup log showed -

Start Node-RED
Once Node-RED has started, point a browser at
On Pi Node-RED works better with the Firefox or Chrome browser
Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot
To find more nodes and example flows - go to
Starting as a systemd service.
8 Aug 22:53:10 - [info]
Welcome to Node-RED
8 Aug 22:53:10 - [info] Node-RED version: v3.0.2
8 Aug 22:53:10 - [info] Node.js  version: v18.17.0
8 Aug 22:53:10 - [info] Linux 6.1.21-v8+ arm LE
8 Aug 22:53:12 - [info] Loading palette nodes
8 Aug 22:53:15 - [info] Dashboard version 3.5.0 started at /ui
8 Aug 22:53:16 - [info] Settings file  : /home/pi/.node-red/settings.js
8 Aug 22:53:16 - [info] Context store  : 'default' [module=memory]
8 Aug 22:53:16 - [info] User directory : /home/pi/.node-red
8 Aug 22:53:16 - [warn] Projects disabled : editorTheme.projects.enabled=false
8 Aug 22:53:16 - [info] Flows file     : /home/pi/.node-red/flows.json
8 Aug 22:53:16 - [info] Server now running at
8 Aug 22:53:16 - [warn]
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
8 Aug 22:53:16 - [info] Starting flows
8 Aug 22:53:16 - [info] Started flows
8 Aug 22:53:16 - [info] [mqtt-broker:dc0340c9643bd396] Connected to broker: mqtt://

thanks so much for the help its much apreciated

Sorry, I am out of ideas. I am away for a few days so can't help any more at the moment. Hopefully someone else may have an idea.

1 Like

Usually, this makes no difference, but also, no reason not to.

Reading through this, there is not enough history to pin point the issue so I suggest:

  1. Fully remove NODE and NPM - all remnants - clean up. From stackverflow:

    Note: This will completely remove nodejs from your system; then you can make a fresh install from the below commands.

    Removing Nodejs and Npm

    sudo apt-get remove nodejs npm node
    sudo apt-get purge nodejs

    Now remove .node and .npm folders from your system

    sudo rm -rf /usr/local/bin/npm 
    sudo rm -rf /usr/local/share/man/man1/node* 
    sudo rm -rf /usr/local/lib/dtrace/node.d 
    sudo rm -rf ~/.npm 
    sudo rm -rf ~/.node-gyp 
    sudo rm -rf /opt/local/bin/node 
    sudo rm -rf opt/local/include/node 
    sudo rm -rf /opt/local/lib/node_modules  
    sudo rm -rf /usr/local/lib/node*
    sudo rm -rf /usr/local/include/node*
    sudo rm -rf /usr/local/bin/node*

    Go to home directory and remove any node or node_modules directory, if exists.

    You can verify your uninstallation by these commands; they should not output anything.

    which node
    which nodejs
    which npm
  2. Clean up node-red node_modules
    rm -rf /home/pi/.node-red/node_modules
  3. Install node-red WITH nodeJS (note how the script has --node18 parameter on the end)
    bash <(curl -sL --node18
  4. Install node-red node_modules
    cd /home/pi/.node-red
    npm install
  5. start node-red
  6. install node from palette
1 Like

thanks so much it worked a treat. your a star.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.