# Can't update or add nodes

**URL:** <https://discourse.nodered.org/t/cant-update-or-add-nodes/80416>\
**Category:** General\
**Created:** [8 August 2023 18:57 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416 "2023-08-08T18:57:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![montyfert](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@montyfert](https://discourse.nodered.org/u/montyfert)\
**Post date:** [8 August 2023 18:57 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/1 "2023-08-08T18:57:33Z")

</div>

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

```auto
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 
martin

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 August 2023 19:20 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/2 "2023-08-08T19:20:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![montyfert](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@montyfert](https://discourse.nodered.org/u/montyfert)\
**Post date:** [8 August 2023 19:29 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/3 "2023-08-08T19:29:07Z")

</div>

> [@zenofmud](#):
>
> npm install @korve/node-red-convert-unit

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

```auto
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
thanks 
martin

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 August 2023 19:43 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/4 "2023-08-08T19:43:46Z")

</div>

> [@montyfert](#):
>
> `npm ERR! Cannot read properties of undefined (reading 'isStream')`

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

> [@montyfert](#):
>
> `pi@raspberrypi:~ $ npm install @korve/node-red-convert-unit`

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`  
show?

---

<div class="post-metadata">

**Author:** ![montyfert](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@montyfert](https://discourse.nodered.org/u/montyfert)\
**Post date:** [8 August 2023 20:03 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/5 "2023-08-08T20:03:16Z")

</div>

> [@Colin](#):
>
> apt policy nodejs

tried with no luck  
apt policy nodejs says

```auto
pi@raspberrypi:/usr/lib/node_modules/node-red $ apt policy nodejs
nodejs:
  Installed: 18.17.0-deb-1nodesource1
  Candidate: 18.17.0-deb-1nodesource1
  Version table:
 *** 18.17.0-deb-1nodesource1 500
        500 https://deb.nodesource.com/node_18.x bullseye/main armhf Packages
        100 /var/lib/dpkg/status
     12.22.12~dfsg-1~deb11u4 500
        500 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
pi@raspberrypi:/usr/lib/node_modules/node-red $ 

```

cant install any nodes

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 August 2023 20:12 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/6 "2023-08-08T20:12:44Z")

</div>

> [@montyfert](#):
>
> `pi@raspberrypi:/usr/lib/node_modules/node-red $ apt policy nodejs`

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

```auto
node-red-stop
node-red-start

```

Copy/paste the text please rather than screenshot.

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

---

<div class="post-metadata">

**Author:** ![montyfert](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@montyfert](https://discourse.nodered.org/u/montyfert)\
**Post date:** [8 August 2023 21:57 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/7 "2023-08-08T21:57:25Z")

</div>

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 -

```auto
Start Node-RED
 
Once Node-RED has started, point a browser at http://192.168.0.107:1880
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 http://flows.nodered.org
 
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 http://127.0.0.1:1880/
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://192.168.0.107:1883

thanks so much for the help its much apreciated
martin

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 August 2023 07:55 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/8 "2023-08-09T07:55:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 August 2023 08:31 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/9 "2023-08-09T08:31:05Z")

</div>

> [@montyfert](#):
>
> is it worth removing node red and rinstalling,

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
> 
> ```auto
> sudo apt-get remove nodejs npm node
> sudo apt-get purge nodejs
> 
> ```
> 
> Now remove `.node` and `.npm` folders from your system
> 
> ```auto
> 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.
> 
> ```auto
> which node
> which nodejs
> which npm
> 
> ```

2. Clean up node-red node\_modules

```auto
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
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node18

```

4. Install node-red node\_modules

```auto
cd /home/pi/.node-red
npm install

```

5. start node-red

```auto
node-red-start

```

6. install node from palette

---

<div class="post-metadata">

**Author:** ![montyfert](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@montyfert](https://discourse.nodered.org/u/montyfert)\
**Post date:** [9 August 2023 13:10 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/10 "2023-08-09T13:10:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 August 2023 13:10 UTC](https://discourse.nodered.org/t/cant-update-or-add-nodes/80416/11 "2023-08-23T13:10:10Z")

</div>

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