Help with "Module not locally installed.."

Thanks, I got a reply that states.
– node-red-node-serialport@0.62

Now, how do I fix it so that I can update it through the Node-RED “Manage Palette” ?
Can I uninstall it with this
“nmp uninstall -g node-red-node-serialport” and then use the Node-RED manager?

I upgraded Node-RED to 0.18.4 is that what you are asking?

OK I see it on the Node-RED command prompt.
Node-RED version: v0.18.4
Node.js version: v8.9.4

Can I uninstall it with this
“nmp uninstall -g node-red-node-serialport” and then use the Node-RED manager?

Yes - that should do it.

knolleary,
While it was probably something I could muddle around and figure out, I don’t like ruining installs and doing things wrong if i don’t need to.

It worked perfectly and I can upgrade the next time there is an update.
Thanks,
Kyle

Tried to update node-red-node-rbe and it reports 'not installed locally' etc.

pi@raspberrypi:~ $ npm list -g node-red-node-rbe
/usr/lib
└─┬ node-red@0.19.4
  └── node-red-node-rbe@0.2.3

So following the above comments this thread;

pi@raspberrypi:~ $ npm uninstall -g node-red-node-rbe
up to date in 0.553s

...and it's still there!

pi@raspberrypi:~ $ npm list -g node-red-node-rbe
/usr/lib
└─┬ node-red@0.19.4
  └── node-red-node-rbe@0.2.3

Ideally, I would like to manage my nodes via the 'Manage Palette' interface.

npm version 6.4.1

It's a core node so is under the main node-red global install (as you have shown). So if you are using Node-RED pre v0.19.4 you do need to use sudo to remove it from the correct place

cd /usr/lib/node_modules/node-red/node_modules
sudo npm uninstall node-red-node-rbe

then you can re-install it from the palette.

If using 0.19.4 or more recent - you can just install a newer version locally and we will ignore the core one

cd ~/.node-red && npm i node-red-node-rbe

PS- Always worth checking what was actually changed... in this case just the Japanese locale file... so unless you need it - don't worry about it.

That's very kind of you (NOT)!
What would then happen, I'd have 2 rbe nodes installed, one locally & one core...
How would subsequent rbe updates be made, by the 'Palette Manager' updating the local node? or would I be back where I am today?

If you are on 0.19.4 (which you are - hurrah!), then if you manually install node-red-node-rbe in ~/.node-red then Node-RED will use that one in preference to the globally installed one - so you don't have to touch the globally installed one. And once you've done the manual install, the palette manage should be able to update it with any future updates.

It's such a new thing that @dceejay must have forgotten about it :wink:

Ah true yes - but you do have to manually install it locally (as the palette says it is already installed...) - so either remove manually and then use palette - or install manually .

And given those options, I'd recommend just doing the manual install of the local version rather than mucking around with the global install etc which will only get reverted when you next update Node-RED.

1 Like

Just done a manual install of the local version of rbe & twitter, and all went well, I'm back up-to-date.

"should" will be revealed when the nodes are next updated...

Thanks both :smiley:

Yeah - I'm looking forward to testing it as well :wink:

1 Like

I don't understand why the bash script does not update the email module as it is a core module.
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)

Is it a problem with bash script, or is the out of date email module still being distributed with Node-Red 19.5?

This solution appears to be a very messy solution. The problem is that the Palette manager still shows that the email node is the old version. This is very confusing.

Hi @whatsupskip,

I apologise in advance for the number of version numbers I'm about to talk about. There are three things at play here: the version of Node-RED, the version of node-red-node-email and the version of Node.js.

The node-red package lists node-red-node-email as a dependency so gets installed alongside node-red, rather than as a 'local' node under ~/.node-red/...

With Node-RED 0.19.x, that dependency is set to 0.x so it will pickup the most recent email node in the 0.x stream. This is because NR 0.19.x still supports Node.js 4.x.

The 1.x stream of the email node requires Node.js 8.x - so we cannot change NR's dependency on 0.x until we drop Node 4.x support in the Node-RED 0.20 release.

This is why the upgrade script will not install the 1.x version of email.

If you're already using Node 8, then you can manually install the very latest email node in ~/.node-red and then carry on with life.

In the 0.20 release we've removed the 'local' node check in the palette manager, so it'll upgrade the node by installing the newer copy in ~/.node-red for you. But until then, you need to do that initial local install manually.

2 Likes

Hi @knolleary,

Thank you for your detailed explanation. It all makes sense now and the issue will go away when the 0.20 release comes out. That is great to hear.

1 Like

I'll have to jump in here now.

I too am having problems with some of the nodes and I was sent to this thread.

Ok, I get what needs to be done as pointed out by dceejay in an early post.

But.......

I

sudo npm uninstall node-red-node-rbe

as stated. I then go to the machine's Node-red edit page and it says rbe is still installed.
Therefore I can't:

then you can re-install it from the palette.

So I am guessing that a NR restart is called for?
(If it is, it would have been nice if that was stated in the reply.)

Anyway, this is just put here for clarity and I do hope that a restart will fix the problem.

Also, as I am reading I see people have problems with their serial port node, and others.
I am guessing they are suffering the same problem as the rbe node.

After the uninstall I get this message:

pi@MusicPi:~/.node-red $ sudo npm uninstall node-red-node-rbe
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

audited 155 packages in 6.486s
found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
pi@MusicPi:~/.node-red $ 

So would the npm audit fix resolve the problem/s rather than uninstalling, rebooting/restarting and reinstalling?

This is a bit worrying for one of my machines:

pi@TelePi:~/.node-red $ sudo npm uninstall node-red-node-rbe
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

audited 2062 packages in 124.707s
found 100 vulnerabilities (19 low, 67 moderate, 14 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Having fun with the other machines too....

There's little point in trying to uninstalling the node, it will only be replaced next time you update node-RED.

Hi @Trying_to_learn

You do not need to uninstall the nodes.

As long as you are using Node-RED 0.19.4 or later, the only step you need to take is to npm install the newer version of them in ~/.node-red. Node-RED will take care of the rest.

The npm command line tool know nothing about Node-RED. There's no way it would know to say anything about it.

The npm audit warnings are a completely separate matter and I do not want to derail this topic with them. If you want to discuss them, start a new topic.

Yeah, but I am only going on what was said.

(for clarity)

It's a core node so is under the main node-red global install (as you have shown). So you do need to use sudo to remove it from the correct place

cd /usr/lib/node_modules/node-red/node_modules
sudo npm uninstall node-red-node-rbe

then you can re-install it from the palette. BUT if you upgrade the core we will re-install it for you

To further confuse the situation: it was said to uninstall the node.

I have since discovered that after the uninstall, if I install the node (from the CLI/terminal) and restart NR, all is good.

But thanks Paul and Nick for the replies.

I'm going through updating about 10 Pi's just now with this problem.
And as you may have seen, there are/were some problems with some of the machines.

To the best of my knowledge, all of them are up to date with NR 19.4