Help with "Module not locally installed.."

I'm a newbie and going through training at present. I wanted to upgrade my node-red-serialport nodes and it gives me this error.

Can anyone help with resolving this? Also, where are the log files?

Thanks in advance!

Kyle

The log file location is dependant on how you are running Node-RED. i.e. pm2

Where and how are you running Node-RED?

Windows 10. Installed per instructions on the site for “Windows”

“Module not locally installed” means the node is not installed under your user’s .node-red directory. You may have installed it as a global module.

What version of node.js and node-red are you using?

In a command shell, run npm list -g node-red-node-serialport - that will show if you have it globally installed or not.

If it does show up, then npm install -g node-red-node-serialport should get it updated.

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