Warnings when starting NR on macOS

Running MacOS version 10.14.6, starting NR gives

Welcome to Node-RED

28 Mar 18:51:45 - [info] Node-RED version: v1.0.4
28 Mar 18:51:45 - [info] Node.js version: v8.11.2
28 Mar 18:51:45 - [info] Darwin 18.7.0 x64 LE
28 Mar 18:51:45 - [info] Loading palette nodes
28 Mar 18:51:47 - [info] Worldmap version 2.3.2
28 Mar 18:51:47 - [info] Dashboard version 2.19.4 started at /ui
(node:9155) Warning: N-API is an experimental feature and could change at any time.
(node:9155) [DEP0016] DeprecationWarning: 'GLOBAL' is deprecated, use 'global'

and so on. I realize these messages are just warnings, but I don't think I saw them before NR version 1.0.0. Can anyone explain them? Just curious.

They are messages coming from node.js itself - they are not being logged by Node-RED.

I don't see those messages when I run on osx, so they may be caused by a contrib node you have installed.

I assume something you have installed is using N-API which is a newer way of creating modules with binary components. And the other speaks for itself... A search through your node modules directory for GLOBAL may help to find the node at fault.

Also worth remembering that node 8 is no longer maintained and you ought to be on 10 at least.

1 Like

Once again, thanks for the help. Updating node.js to version 12.16.1 eliminated the N-API warning. The node.js website lists 12.16.1 as LTS, but the NR documentation says 10.x is recommended. Does it matter?

The DeprecationWarning was caused by node-red-contrib-clipboard. Is it worth raising an issue on GitHub for something this minor? [EDIT] Turns out the warning comes from a dependency, copy-paste, which has had an issue open for almost four years. It's an easy fix if it ever has to be done.

If the author doesn't know about it it is unlikely he will fix it :laughing:

If it only happens on an obsolete version of nodejs it probably isn't worth fixing anyway.

@Colin but if you open an issue in GitHub, you increase someone else finding it and helping them out easier...

If you both read the thread you'll see an issue has been open for 4 years on the module that is causing the GLOBAL warning.

The other issue was down to the old version of Node.js where any use of N-API would trigger the warning.

The open issue is with copy-paste, There is no open issue with node-red-contrib-clipboard which is where I would suggestion opening an issue so future users of that node would be informed. The OP sould point to the copy-paste issue if they open an issue in node-red-contrib-clipboard

I have opened an issue. I doubt that new users will see it unless they are able to trace the warning message to node-red-contrib-clipboard. I suggested some alternatives, but the developer doesn't seem to be maintaining the node, and it's not really his problem. We'll see.

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