Problems with a few nodes fallback rebuilding utf-8-validate, serialport in Node.js v10.15.1


I am installing node-RED on a Pi3B+ and see a long message with gibberish of faults.
It happens every time I get the dependency utf-8-validate and also a few others like bufferutil and serialport. I am running this with the help of Peter Scargill's Script.
So this is on Raspbian Stretch with desktop and Node.js v10.15.1 NR 0.19.5.
If you look to the gibberish than it looks like a lot of nodes have a dependency to utf-8-validate, but are not compatible to v10 of Node.js, something like deprecated.
How can I update to a compatible version for these dependencies packages or is this not in my power and have the owners of all the parent packages update their package.json's? Now when I update and use the command npm install it takes ages to complete the procedure!



Can you show us the gibberish please.
It may be that something is not compatible with nodejs 10.x, in which case downgrading to 8.x would be the way to go.



Here you have a small piece of it:

utf-8-validate@1.2.2 install /home/pi/.node-red/node_modules/utf-8-validate
node-gyp rebuild

make: Entering directory '/home/pi/.node-red/node_modules/utf-8-validate/build'
CXX(target) Release/
In file included from ../node_modules/nan/nan.h:190:0,
from ../src/
../node_modules/nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’:
../node_modules/nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
return obj->ForceSet(GetCurrentContext(), key, value, attribs);

There are quite a number of versions in a number of nodes, but all are trying to rebuild the binary and all do not succeed in doing so. Although this is an optional dependency.



What is the actual node being installed that is pulling in that one?



node-red-contrib-graphs pulls in bufferutil and utf-8-validate



For me it does install after getting the errors, presumably as they are optional dependencies.
The problem is that those nodes are pulling in ancient versions of bufferutil and utf-8-validate, which are probably not compatible with node 10.
You should submit an issue against node-red-contrib-graphs on its github page.
In the meantime if you don't need the optional dependencies then ignore the problem. Alternatively you could try down grading nodejs to 8.x.



There are so many nodes that are not (yet) compatible with nodejs v10 that is not my job when they are optional dependencies. So only if I need them in my flows I should bother about it!
bufferutil for example claims that this makes node ws fast, so I step on a slow train, but that 's nice too now and then(cheaper anyway than HS2 in the UK).
So that is what I thought, if you want that corrected I have to raise an issue to the maker of the parent(s) node(s).
I leave it as long I am not nagged by any of them or search for an alternative.



The spirit of using open source s/w is that everyone should do their bit. One thing one should do is to report issues to the author if you find them. Otherwise he/she may not realise there is an issue.

1 Like


Sorry, but I will try now and then. What I really mean in this case is the fact I don't even know where to begin, there are so many nodes involved. At the moment it is not a REAL issue for me as I am not using any node that is broken because of updating to v10 of nodejs.
I get the impression that there is some work to do to get people aware of the changes that have been made in the architecture of the v10 update. I am quite sure that this not MY JOB.
This weekend I spent some time trying to help to solve the problems with node Bigtimer which was kind of a learning exercise as I am completely new to the Nodejs programming.



I have submitted an issue on node-red-contrib-graphs but I suspect that development of the node is dead. It has not been touched in three years. I advise against using it. Is it pulled in by @scargill's script?



Scargill here. It was in the script - agree, quit old so I've comented it out in the script - anyone who really wants it can add it into their copy.