🎉 Node-RED 2.0.3 Released

I'm using an external module - ping - npm in a function node which has worked fine so far, but since v2.0.0 (v2.0.1, v2.0.2 or v2.0.3 - can't be sure) I've hit a problem.
I get the error in debug;

Error: Cannot find module '/home/pi/.node-red/node_modules/ping'
Require stack:
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/externalModules.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/registry.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js

If I check .node-red/node_modules, the ping module is not installed, but it is listed in .config.modules.json (having being moved from externalModules during the update)

    "ping": {
        "spec": "ping",
        "module": "ping",
        "builtin": false,
        "known": false
    },

... and also in package.json

 "ping": "^0.4.1"

Note: During the v2.0.2 > v2.0.3 update, I updated node from version 12 to 14 using the install script.

That is an odd combination of things. For it to be listed in your package.json, the npm install must have completed. So for it to not be in the node_modules directory is odd. Can't readily explain that.

Rolled back to node v12 - error persists
Rolled back to node-RED v2.0.2 - error persists
Rolled back to node-RED v2.0.1 - error persists
Ran npm update in .node-red - module now installed OK
Updated to node-RED v2.0.3 & node 14 via script - module still installed & no error msg.

???

So working with Monaco is refreshing, one thing that has changed (as it seems) that the key combination CTRL+ENTER will not close the dialog (as in all dialogs), but will just add a carriage return to the edited code...this habit in quite rooted...is there anything that we can do about it?

@sharonv Did CTRL+ENTER in ACE close the dialog? (I forget)

Yes - because ACE doesn't have any shortcut bound to that.

Is it worth seeing if we can "un-bind" that in Monaco?

If I remember right, in many editors ENTER can differ from CTRL+ENTER (e.g. new paragraph Vs break)

Please do go into the flows site and put 1-star's on any nodes that are not being updated so that other people don't caught by the same issues.

2 Likes

After upgrate 1.3 to 2.0.3 having message "type_already_registered".
I know that now it is "filter" node but how i can remove registered rbe type from node red without removing RBE nodes from flows?

Hi @midnight1979, in your node-red user directory, ~/.node-red, you should be able to run:

npm remove node-red-node-rbe

and then restart Node-RED.

If that doesn't do it, then please share some more details on how you have Node-RED installed.

1 Like

it is ok now - thanks!

After upgrading to version 2.0.3, at first glance, the performance has improved greatly! Deploy became MUCH faster with the same number of nodes - very impressive! :+1: :+1: :+1: :+1: :+1: :+1: :+1:

1 Like

Reported here

1 Like

Hey y'all...

Tried an upgrade on my pi and got the following:

Error loading settings file: /home/pi/.node-red/settings.js
Error: The module '/home/pi/.node-red/node_modules/i2c-bus/build/Release/i2c.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at bindings (/home/pi/.node-red/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/home/pi/.node-red/node_modules/i2c-bus/i2c-bus.js:4:32)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
nodered.service: Succeeded.

Any pointers?

Regds
Ed

You need to make sure you run npm rebuild in the your /home/pi/.node-red directory to makes sure all the nodes with native components are updated to match the new version of NodeJS you are running.

But in this case it looks like you have downgraded your version of NodeJS. Exactly how did you do the upgrade.

Thanks for coming back to me!

I did the upgrade from the script on the node red org page:
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

Also tried the npm rebuild too.... to no avail... (I don't think I was in the .node-red directory - It didn't return any errors though...)

E

You need to run that command in the /home/pi/.node-red/ directory for it to work.

Thanks @hardillb

Ok, will do.... Will have to wait a bit though, I have just hit into the sunset hours where NR controls the load on my inverter quite strictly.... Will give it a go tomorrow!!

(A good reason to back up the system before poking it with an "engineering stick")

Will report back when I give it another poke!!

Regds
Ed

a good reason to have a backup Pi which is a copy of your 'live' pi. Then you could test things on it before changing the 'live' version.

@zenofmud

Lol..... that would mean about an additional 6 units or so.... No, more than that!! (Media players, gamers, controllers, octopi'ses, routerpi'ses etc).... I'll just stick to backing up the cards!!

E

1 Like