Serialport NODE_MODULE_VERSION problems, again

Before anyone suggests npm rebuild or npm install. I've gone that route, npm rebuild leaves the problem. And npm audit fix --force hangs on the g++ serialport compile.

Okay I've removed the ${HOME}/.node-red/node_modules dir. I proceed to ${HOME}/.node-red and do my npm install node-red@1.2.9. I start node-red -v and I'm greeted by this:

8 Mar 19:34:08 - [warn] [node-red-node-serialport/serialport] Error: The module '/home/njc/.node-red/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 88. This version of Node.js requires
NODE_MODULE_VERSION 91. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

I'm going a bit nuts, I'm trying to fix the node-red-node-serialport issue. I removed it from my node-red when I kept getting version errors.

How do I go about getting version 88? And why does npm keep installing version 99?

Also why does 1.2.8 get installed when I do this:

npm install node-red@1.2.9

Edit: Figured out the 1.2.8, seems that the global npm had 1.2.8 installed.

Not fixed but after much hand wringing I've managed to remove the serial port from being a problem with my production env (making my wife happy).

I setup another node-red running on a different port. I can play to my hearts content there an attempt to figure out a way to get this to work.

I also did something accidental. I change the path for a different user and I see that I have two different node-red installed.

8 Mar 21:57:55 - [info] Node.js  version: v10.24.0


8 Mar 21:54:46 - [info] Node.js  version: v15.6.0

I bet this has something to do with this issue.

My apologies, this is a problem of my own making. I shouldn't be using Node 15.6.0. The recommended is 12.x and 14.x supported. I'll go sit in the corner now :roll_eyes:

1 Like

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