I have problem "Flows due to missing node types"

Hi everyone,

I have a problem with Node-RED.
Node-RED Version 2.2.2
Node.js version V12.22.12
I have an IoT2050 basic FS:04, image V1.3.1

I want to use an email node 'node-red-node-email' and I get

then in manage palette, I get this

and in event log, I get this

I can't update nodes because it requires a higher version, do you know if the IoT2050 FS:04 basic can be updated to a higher version or up to what version I can use?

Thank you very much

Best regards

(It may help if rather than pasting cropped screen shots, you posted the actual text.)

Hi @Trying_to_learn ,

This is what I get, I can give you the text of the event log


2023-05-29T06:08:02.005Z Install : node-red-node-email 2.0.0

2023-05-29T06:08:02.158Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-email@2.0.0
2023-05-29T06:08:20.470Z [out]
2023-05-29T06:08:20.470Z [out] added 1 package in 17s
2023-05-29T06:08:20.535Z rc=0

That's all I get

Thank you very much!

Best regards

I believe the problem is that the version of nodejs that you are using (V12) is long out of support. The latest version of the email node needs at least 14. If you can't update nodejs then I think all you can do is to go back to an earlier version of the email node. The last of the 1.n.n series should be ok.

Hi @Colin ,

I think it is possible with the versions I have

Oh, it appears I am mistaken.

Please post the log that you see when you start node red. It should start with the Welcome to node red message.

The error occurs when I put the node on the white board, and in manage palette I always get the error that I have shown in the picture. :melting_face:

Did you import a flow which includes an email node?
Perhaps the missing email node is not part of node-red-node-email but some other widget.

You should start Node-red in safe mode, search your flows for email and replace it with node-red-node-email, which looks like it is installed successfully.

Hi @jbudd,

Don't import any flow, Node-RED is newly installed. In manage palette I installed 'node-red-node-email' and I get that directly.

Now what I have done is to remove the package inside manage palette and I have installed it through the terminal inside the ~/.node-red directory and then npm i node-red-node-email. The same error
How do I start in safe mode and see all the installed nodes?

Thank you very much

Best regards

Hmm

That does seem to show it's node-red-node-email not some other node.

As I asked, please post the startup log you get if you restart node red after you have added an email node and deployed.
On a pi you would do that by running, in a command window

node-red-stop
node-red-start

How you do that on your device I don't know.

Within the IoT2050 basic FS:04, I believe you cannot upgrade to node.js v18.16.0. I tried it the other day and it gave error, I think I did it right.

Updated Node-RED to V3.0.2, then it is not visible in the browser.

I don't think the email node is giving an error because of the version.

root@iot2050-debian:~# node-red start
29 May 06:46:13 - [info]

Welcome to Node-RED

29 May 06:46:13 - [info] Node-RED version: v3.0.2
29 May 06:46:13 - [info] Node.js version: v12.22.12
29 May 06:46:13 - [info] Linux 5.10.104-cip3 arm64 LE
29 May 06:46:16 - [info] Loading palette nodes
29 May 06:46:32 - [info] Dashboard version 3.5.0 started at /ui
29 May 06:46:34 - [warn] ------------------------------------------------------
29 May 06:46:34 - [warn] [node-red-node-email/email] SyntaxError: Unexpected token '?'
29 May 06:46:34 - [warn] ------------------------------------------------------
29 May 06:46:34 - [warn] Missing node modules:
29 May 06:46:34 - [warn] - node-red-node-intel-gpio (0.0.6-IOT2050): mraa-gpio-ain, mraa-gpio-din, mraa-gpio-dout, mraa-gpio-pwm, mraa-gpio-led
29 May 06:46:34 - [info] Removing modules from config
29 May 06:46:34 - [info] Settings file : /root/.node-red/settings.js
29 May 06:46:34 - [info] Context store : 'default' [module=memory]
29 May 06:46:34 - [info] User directory : /root/.node-red
29 May 06:46:34 - [warn] Projects disabled : editorTheme.projects.enabled=false
29 May 06:46:34 - [info] Flows file : /root/.node-red/start
29 May 06:46:34 - [info] Creating new flow file
29 May 06:46:34 - [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.

29 May 06:46:34 - [warn] Encrypted credentials not found
29 May 06:46:34 - [error] Unable to listen on http://127.0.0.1:1880/
29 May 06:46:34 - [error] Error: port in use

I don't like the look of any of that!
Error: port in use suggests Node-red was still running when you tried to start it.

I don't ever run Node-red as root, but maybe that's enforced by your hardware?

Creating new flow file Have you never deployed even a simple inject - debug flow?

If I had this problem I would try version 1.19.1
cd ~/.node-red
pwd
whoami
node-red-stop
npm unistall node-red-node-email
npm install node-red-node-email@1.19.1
node-red-start

It's all guesswork though since your setup seems so different from mine (Raspberry Pi)

I still think it may be an issue with the Nodes version. I haven't got a system with nodejs 12 to test it on at the moment.

I have already used Node-RED in another project. Now here in this IoT this is happening to me only with this node that gives error and I have to use it, others do not.

It also gives error the version that you said...

Thank you very much

Best regards

How can I get you a version?

As @jbudd has suggested, try installing the older version of the email node.
Make sure you then stop node-red and restart after doing that (or power cycle if you don't know how to stop node-red). I suspect that the comment on the node's page is wrong and that it does need a later version.

  1. Was Node-red on this device installed as the the root user?
  2. Does the IoT2050 have "normal" users as well as root?
  3. Have you ever successfully deployed any flow on this device?
  4. Does the error popup immediately "when you drag the node onto the white board" or when you click Deploy?
  5. As @Colin keeps hinting, node.js v12 is likely to give you all sorts of problems. v18 is not required. Have you tried to update to v14 or v16?

Node-RED 3.0.2 supports a minimum NodeJS version of v14.x (as shown by the package.json node-red/package.json at master · node-red/node-red · GitHub)

Running on NodeJS v12 will lead to all sorts of problems.

If you can not upgrade the NodeJS version to at least v14 then you must downgrade Node-RED to 2.2.3 which will support NodeJS v12, but many nodes will be updated to expect to be running on Node-RED 3.2 and NodeJS v14+ these days.