Waiting for missing types to be registered - node-red-node-email

I am having problems trying to use the node-red-node-email node. I use the palette manager to download the latest version. The installation process is successful however the nodes do not show up in the node-red left-hand panel. When I look in the palette, I see that there is a yellow exclamation mark beside the node-red-node-email with the text "[object Object]" beside it. After reading many articles, I found that there might be more info on the error when I start node-red from the prompt. I launched node-red from the terminal and the message "Waiting for missing types to be registered: - e-mail (provided by npm module node-red-node-email)". I searched for the "waiting for missing types to be registered" message but most of the articles had to do with code bugs when individuals were authoring their own nodes. I would not imagine that there are code issues with node-red-node-email or it would have been reported by now. I checked to ensure that I have all the necessary prerequisites for this modules which I do.

Welcome to the forum @jmtkelly

Go into your .node-red folder (or wherever you flows file is located if it is not a normal node-red install) and run
npm remove node-red-node-email
npm install node-red-node-email
and copy/paste the full output here please, including the line showing the commands.

Colin,

Thanks for the help. See below for details:

This is the remote results:

root@iot2050-debian:~/.node-red# npm remove node-red-node-email

removed 39 packages, and audited 974 packages in 28s

71 packages are looking for funding
run npm fund for details

32 vulnerabilities (7 moderate, 21 high, 4 critical)

To address issues that do not require attention, run:
npm audit fix

To address all issues possible (including breaking changes), run:
npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.
root@iot2050-debian:~/.node-red#

This is the install results:

root@iot2050-debian:~/.node-red# npm install node-red-node-email

added 1 package, and audited 1013 packages in 24s

82 packages are looking for funding
run npm fund for details

32 vulnerabilities (7 moderate, 21 high, 4 critical)

To address issues that do not require attention, run:
npm audit fix

To address all issues possible (including breaking changes), run:
npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.
root@iot2050-debian:~/.node-red#

When I run node-red again at the command prompt here is what I get:

root@iot2050-debian:~/.node-red# node-red
23 Dec 23:26:44 - [info]

Welcome to Node-RED

23 Dec 23:26:44 - [info] Node-RED version: v2.0.6
23 Dec 23:26:44 - [info] Node.js version: v12.22.5
23 Dec 23:26:44 - [info] Linux 5.10.64 arm64 LE
23 Dec 23:26:47 - [info] Loading palette nodes
23 Dec 23:27:5 - [s7comm-Error] - Installation of Module net-keepalive failed because we might be on the wrong OS. OS=linux
23 Dec 23:27:5 - [s7comm-Info] - Debug configuration for logLevelNodeS7:{"debug":0,"silent":true}
23 Dec 23:27:5 - [s7comm-Info] - Debug configuration for logLevelNodeRED:{"debug":2,"silent":true}
23 Dec 23:27:06 - [info] Dashboard version 2.30.0 started at /ui
23 Dec 23:27:07 - [warn] ------------------------------------------------------
23 Dec 23:27:07 - [warn] [node-red-node-email/email] SyntaxError: Unexpected token '?'
23 Dec 23:27:07 - [warn] ------------------------------------------------------
23 Dec 23:27:07 - [info] Settings file : /root/.node-red/settings.js
23 Dec 23:27:07 - [info] Context store : 'default' [module=memory]
23 Dec 23:27:07 - [info] User directory : /root/.node-red
23 Dec 23:27:07 - [warn] Projects disabled : editorTheme.projects.enabled=false
23 Dec 23:27:07 - [info] Flows file : /root/.node-red/flows.json
23 Dec 23:27:08 - [info] Server now running at http://127.0.0.1:1880/
23 Dec 23:27:08 - [info] Starting flows
23 Dec 23:27:08 - [info] Started flows

When I look at the palette in node-red via my browser, I have a yellow exclamation mark next to the node-red-node-email still.

This looks like there is optional chaining in the email node which requires modejs v14 or greater.

Your device has nodejs V12

Maybe @dceejay can confirm?

Steve,

The README.md file in the ~.node-red/node-modules/node-red-node-email/ directory states that

"Note : Version 1.x of this node requires Node.js v8 or newer."

I am running node 12.22.5

If you feel that an upgrade is required then I can try that however I've had mixed results in the past updating node.js whereas other things seem to get broken.

Please advise.

I’ll try to check the code later today but hey Xmas eve and all that. You can install a previous version of the node if you like but right now I can’t tell you which version broke with node 12.

OK - hopefully just the mailparser - now pinned back in version 1.18.4

Thanks! That seemed to have resolved the issue. I am new to node-red and, as I am trying to learn more, was wondering if you could explain to me what exactly the issue was here.

Thanks again for the Christmas Eve Fix!

The issue was, I believe, the the javascript language is still evolving. Nodejs 14 (which contains the code that understands the javascript) included support for some new features in the language. Unfortunately an update to the email node used some of the new javascript syntax that was not available in nodejs 12. Therefore the version of the email node did not work with nodejs 12. I assume that Dave has modifed that code so that it does not use the new feature.

The current version of node red (3.x) require nodejs14 or above so developers are now used to using the new features, which is probably how it accidentally got used in the email node.

1 Like

Thanks for the explanation Colin. Much appreciated.

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