Node-red-contrib-inspector fail with 32 bits os?

Lately I have CPU performance troubles on my RP3B+.
At the beginning of this summer my project was more then 95% finished, and over the summer until now I only made minor changes, some tweaking etc. only more or less of the same functions I already made.
Since a week or so the CPU usage is ramping up over time. Before it was always between 5 and 10%. Now, after restart/reboot, it starts just over 10 and slowly creeps to more then 25% during 24 hours. As long as CPU usage is lower then 10%, Node-Red is performing excellent. Above that performance is getting worse.
With (h)top I can see that node-red is causing more CPU usage.

As I didn't made major changes/developments on node-red, I tried searching for the problem, but didn't find it. So I thought let's try the node-red-contrib-inspector, maybe I can find the source of the problem.with that tool. But now I encounter another problem. It seems I have a 32 bit OS, I always thought I have 64 bits OS.

This is an overview of the software running on my RPI.
afbeelding

Is there somebody that can shine a light on this?

Possibly not helping that you have weird versions of node.js and npm installed. Here's what I have:

Node: v16.17.1
npm: 8.15.0

Generally, you should avoid using odd-numbered versions of node.js as they are considered development versions by many. I think that what you've listed as npm is actually node-red?

Your version of InfluxDB could do with upgrading to v1.8 as well.

I can't read any of the details on that embedded image.

@TotallyInformation Thanks for your reaction. I have replaced the embedded image, It should now be possible to enlarge the image. As about the versions I don't know. At some point in time I installed these with a bash file that was recommended.

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

As I said before I have not experienced any problems over the summer, until about a week ago.

I am not sure if I can update to higher version without getting new problems.

The versions of NPM and node.js I get with following commands:
afbeelding

If you were able to run the bash command, you can simply run it again but passing --node 16 to get the current LTS version of node.js and the corresponding npm version. You should also do:

cd ~/.node-red 
npm rebuild

after changing major node versions. Makes sure that any C++ libraries are rebuilt correctly.

Then just restart node-red and reload the editor.

To get the actual node and npm versions, this command will do it: node --version && npm --version.

If you are running v2.2.0 of node-red, probably best to get the latest version. The script will do that as well as deal with node.js and npm.

Can't say that this will fix your issue but it may well do so and getting everything current is generally the best starting point anyway. Especially as most people in the forum in a position to help you will be on current versions of everything as well.

How do I do this? I didn't make any C++ applications.

I probably should follow your recommendations, luckily I have a second RPI available so I can test these updates. I will try tomorrow.

As I said, this the command npm rebuild in your userDir folder (typically ~/.node-red).

While you didn't make a C++ library, if you have something like the serial or SQLite nodes, they DO have C++ libraries. It is common to get problems after a major version upgrade of node.js if you don't do this.

@TotallyInformation, indeed when I give the command npm --version I get result 7.7.6.
I checked the commands again and found the error. I corrected the result and my software version looks like this,

afbeelding

Leaves me the question in my first comment. Why does my RPI 3B+ reports a 32 bits OS when Node-red-contrib-inspector is used with Chrome inspect?

I thought I had 64-bits OS.also to @BartButenaers

About testing upgrade node.js 15.x to 16.x, that didn't go well.

Here are the steps I took.

  1. Command: curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash

  2. sudo apt-get install -y node.js

  3. cd ~/.node-red

  4. npm rebuild

At point 4 I got a lot of errors. See this error log

> 0 verbose cli /usr/bin/node /usr/bin/npm
> 1 info using npm@8.15.0
> 2 info using node@v16.17.1
> 3 timing npm:load:whichnode Completed in 1ms
> 4 timing config:load:defaults Completed in 8ms
> 5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 3ms
> 6 timing config:load:builtin Completed in 4ms
> 7 timing config:load:cli Completed in 7ms
> 8 timing config:load:env Completed in 2ms
> 9 timing config:load:file:/home/pi/.node-red/.npmrc Completed in 1ms
> 10 timing config:load:project Completed in 14ms
> 11 timing config:load:file:/home/pi/.npmrc Completed in 3ms
> 12 timing config:load:user Completed in 4ms
> 13 timing config:load:file:/usr/etc/npmrc Completed in 1ms
> 14 timing config:load:global Completed in 1ms
> 15 timing config:load:validate Completed in 2ms
> 16 timing config:load:credentials Completed in 4ms
> 17 timing config:load:setEnvs Completed in 4ms
> 18 timing config:load Completed in 54ms
> 19 timing npm:load:configload Completed in 55ms
> 20 timing npm:load:mkdirpcache Completed in 4ms
> 21 timing npm:load:mkdirplogs Completed in 1ms
> 22 verbose title npm rebuild
> 23 verbose argv "rebuild"
> 24 timing npm:load:setTitle Completed in 4ms
> 25 timing config:load:flatten Completed in 14ms
> 26 timing npm:load:display Completed in 47ms
> 27 verbose logfile logs-max:10 dir:/home/pi/.npm/_logs
> 28 verbose logfile /home/pi/.npm/_logs/2022-10-02T13_10_07_825Z-debug-0.log
> 29 timing npm:load:logFile Completed in 74ms
> 30 timing npm:load:timers Completed in 1ms
> 31 timing npm:load:configScope Completed in 0ms
> 32 timing npm:load Completed in 192ms
> 33 timing arborist:ctor Completed in 3ms
> 34 silly logfile done cleaning log files
> 35 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/bufferutil
> 36 timing build:queue Completed in 58ms
> 37 timing build:link:node_modules/acorn Completed in 20ms
> 38 timing build:link:node_modules/bwip-js Completed in 17ms
> 39 timing build:link:node_modules/is-base64 Completed in 17ms
> 40 timing build:link:node_modules/mime Completed in 16ms
> 41 timing build:link:node_modules/jsmodbus Completed in 16ms
> 42 timing build:link:node_modules/mkdirp Completed in 16ms
> 43 timing build:link:node_modules/mustache Completed in 15ms
> 44 timing build:link:node_modules/node-gyp-build Completed in 16ms
> 45 timing build:link:node_modules/pixelmatch Completed in 14ms
> 46 timing build:link:node_modules/prebuild-install Completed in 13ms
> 47 timing build:link:node_modules/rc Completed in 13ms
> 48 timing build:link:node_modules/semver Completed in 12ms
> 49 timing build:link:node_modules/systeminformation Completed in 11ms
> 50 timing build:link:node_modules/sshpk Completed in 13ms
> 51 timing build:link:node_modules/vm2 Completed in 11ms
> 52 timing build:link:node_modules/which Completed in 11ms
> 53 timing build:link:node_modules/node-red-contrib-ui-multistate-switch/node_modules/mustache Completed in 10ms
> 54 timing build:link:node_modules/request/node_modules/uuid Completed in 10ms
> 55 timing build:link Completed in 24ms
> 56 info run @serialport/bindings@9.2.8 install node_modules/@serialport/bindings prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
> 57 info run bufferutil@1.2.1 install node_modules/bufferutil node-gyp rebuild
> 58 info run gc-stats@1.0.0 install node_modules/gc-stats node-gyp rebuild
> 59 info run bufferutil@4.0.6 install node_modules/engine.io/node_modules/bufferutil node-gyp-build
> 60 info run bufferutil@4.0.6 install { code: 0, signal: null }
> 61 timing build:run:install:node_modules/engine.io/node_modules/bufferutil Completed in 1352ms
> 62 info run utf-8-validate@5.0.9 install node_modules/engine.io/node_modules/utf-8-validate node-gyp-build
> 63 info run utf-8-validate@5.0.9 install { code: 0, signal: null }
> 64 timing build:run:install:node_modules/engine.io/node_modules/utf-8-validate Completed in 1239ms
> 65 info run bufferutil@1.2.1 install { code: 1, signal: null }
> 66 timing command:rebuild Completed in 14228ms
> 67 verbose stack Error: command failed
> 67 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
> 67 verbose stack     at ChildProcess.emit (node:events:513:28)
> 67 verbose stack     at maybeClose (node:internal/child_process:1093:16)
> 67 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
> 68 verbose pkgid bufferutil@1.2.1
> 69 verbose cwd /home/pi/.node-red
> 70 verbose Linux 5.10.63-v7+
> 71 verbose node v16.17.1
> 72 verbose npm  v8.15.0
> 73 error code 1
> 74 error path /home/pi/.node-red/node_modules/bufferutil
> 75 error command failed
> 76 error command sh /tmp/install-2a82c177.sh
> 77 error make: Map '/home/pi/.node-red/node_modules/bufferutil/build' wordt binnengegaan
> 77 error   CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
> 77 error make: Map '/home/pi/.node-red/node_modules/bufferutil/build' wordt verlaten
> 78 error gyp info it worked if it ends with ok
> 78 error gyp info using node-gyp@9.0.0
> 78 error gyp info using node@16.17.1 | linux | arm
> 78 error gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
> 78 error gyp info spawn /usr/bin/python3
> 78 error gyp info spawn args [
> 78 error gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
> 78 error gyp info spawn args   'binding.gyp',
> 78 error gyp info spawn args   '-f',
> 78 error gyp info spawn args   'make',
> 78 error gyp info spawn args   '-I',
> 78 error gyp info spawn args   '/home/pi/.node-red/node_modules/bufferutil/build/config.gypi',
> 78 error gyp info spawn args   '-I',
> 78 error gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
> 78 error gyp info spawn args   '-I',
> 78 error gyp info spawn args   '/home/pi/.cache/node-gyp/16.17.1/include/node/common.gypi',
> 78 error gyp info spawn args   '-Dlibrary=shared_library',
> 78 error gyp info spawn args   '-Dvisibility=default',
> 78 error gyp info spawn args   '-Dnode_root_dir=/home/pi/.cache/node-gyp/16.17.1',
> 78 error gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
> 78 error gyp info spawn args   '-Dnode_lib_file=/home/pi/.cache/node-gyp/16.17.1/<(target_arch)/node.lib',
> 78 error gyp info spawn args   '-Dmodule_root_dir=/home/pi/.node-red/node_modules/bufferutil',
> 78 error gyp info spawn args   '-Dnode_engine=v8',
> 78 error gyp info spawn args   '--depth=.',
> 78 error gyp info spawn args   '--no-parallel',
> 78 error gyp info spawn args   '--generator-output',
> 78 error gyp info spawn args   'build',
> 78 error gyp info spawn args   '-Goutput_dir=.'
> 78 error gyp info spawn args ]
> 78 error gyp info spawn make
> 78 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
> 78 error ../src/bufferutil.cc:25:30: error: ‘v8::Handle’ has not been declared
> 78 error    static void Initialize(v8::Handle<v8::Object> target)
> 78 error                               ^~~~~~
> 78 error ../src/bufferutil.cc:25:36: error: expected ‘,’ or ‘...’ before ‘<’ token
> 78 error    static void Initialize(v8::Handle<v8::Object> target)
> 78 error                                     ^
> 78 error ../src/bufferutil.cc: In static member function ‘static void BufferUtil::Initialize(int)’:
> 78 error ../src/bufferutil.cc:33:14: error: ‘target’ was not declared in this scope
> 78 error      Nan::Set(target, Nan::New<String>("BufferUtil").ToLocalChecked(), t->GetFunction());
> 78 error               ^~~~~~
> 78 error ../src/bufferutil.cc:33:14: note: suggested alternative: ‘Merge’
> 78 error      Nan::Set(target, Nan::New<String>("BufferUtil").ToLocalChecked(), t->GetFunction());
> 78 error               ^~~~~~
> 78 error               Merge
> 78 error ../src/bufferutil.cc:33:86: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
> 78 error      Nan::Set(target, Nan::New<String>("BufferUtil").ToLocalChecked(), t->GetFunction());
> 78 error                                                                                       ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:6802:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
> 78 error    V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
> 78 error                                               ^~~~~~~~~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:6802:46: note:   candidate expects 1 argument, 0 provided
> 78 error ../src/bufferutil.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BufferUtil::Merge(Nan::NAN_METHOD_ARGS_TYPE)’:
> 78 error ../src/bufferutil.cc:49:49: error: no matching function for call to ‘v8::Value::ToObject()’
> 78 error      Local<Object> bufferObj = info[0]->ToObject();
> 78 error                                                  ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
> 78 error    V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
> 78 error                                             ^~~~~~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
> 78 error ../src/bufferutil.cc:56:39: error: no matching function for call to ‘v8::Array::Get(unsigned int&)’
> 78 error        Local<Object> src = array->Get(i)->ToObject();
> 78 error                                        ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
> 78 error    V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
> 78 error                                            ^~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
> 78 error    V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
> 78 error                                            ^~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
> 78 error ../src/bufferutil.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BufferUtil::Unmask(Nan::NAN_METHOD_ARGS_TYPE)’:
> 78 error ../src/bufferutil.cc:67:50: error: no matching function for call to ‘v8::Value::ToObject()’
> 78 error      Local<Object> buffer_obj = info[0]->ToObject();
> 78 error                                                   ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
> 78 error    V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
> 78 error                                             ^~~~~~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
> 78 error ../src/bufferutil.cc:69:48: error: no matching function for call to ‘v8::Value::ToObject()’
> 78 error      Local<Object> mask_obj = info[1]->ToObject();
> 78 error                                                 ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
> 78 error    V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
> 78 error                                             ^~~~~~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
> 78 error ../src/bufferutil.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BufferUtil::Mask(Nan::NAN_METHOD_ARGS_TYPE)’:
> 78 error ../src/bufferutil.cc:88:50: error: no matching function for call to ‘v8::Value::ToObject()’
> 78 error      Local<Object> buffer_obj = info[0]->ToObject();
> 78 error                                                   ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
> 78 error    V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
> 78 error                                             ^~~~~~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
> 78 error ../src/bufferutil.cc:89:48: error: no matching function for call to ‘v8::Value::ToObject()’
> 78 error      Local<Object> mask_obj = info[1]->ToObject();
> 78 error                                                 ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
> 78 error    V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
> 78 error                                             ^~~~~~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
> 78 error ../src/bufferutil.cc:91:50: error: no matching function for call to ‘v8::Value::ToObject()’
> 78 error      Local<Object> output_obj = info[2]->ToObject();
> 78 error                                                   ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
> 78 error    V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
> 78 error                                             ^~~~~~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3060:44: note:   candidate expects 1 argument, 0 provided
> 78 error ../src/bufferutil.cc:92:51: error: no matching function for call to ‘v8::Value::Int32Value()’
> 78 error      unsigned int dataOffset = info[3]->Int32Value();
> 78 error                                                    ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
> 78 error    V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
> 78 error                                         ^~~~~~~~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3107:40: note:   candidate expects 1 argument, 0 provided
> 78 error ../src/bufferutil.cc:93:47: error: no matching function for call to ‘v8::Value::Int32Value()’
> 78 error      unsigned int length = info[4]->Int32Value();
> 78 error                                                ^
> 78 error In file included from ../src/bufferutil.cc:7:
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
> 78 error    V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
> 78 error                                         ^~~~~~~~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/v8.h:3107:40: note:   candidate expects 1 argument, 0 provided
> 78 error ../src/bufferutil.cc: At global scope:
> 78 error ../src/bufferutil.cc:114:12: error: variable or field ‘init’ declared void
> 78 error  void init (Handle<Object> target)
> 78 error             ^~~~~~
> 78 error ../src/bufferutil.cc:114:12: error: ‘Handle’ was not declared in this scope
> 78 error ../src/bufferutil.cc:114:12: note: suggested alternative: ‘rand_r’
> 78 error  void init (Handle<Object> target)
> 78 error             ^~~~~~
> 78 error             rand_r
> 78 error ../src/bufferutil.cc:114:25: error: expected primary-expression before ‘>’ token
> 78 error  void init (Handle<Object> target)
> 78 error                          ^
> 78 error ../src/bufferutil.cc:114:27: error: ‘target’ was not declared in this scope
> 78 error  void init (Handle<Object> target)
> 78 error                            ^~~~~~
> 78 error ../src/bufferutil.cc:114:27: note: suggested alternative: ‘tzset’
> 78 error  void init (Handle<Object> target)
> 78 error                            ^~~~~~
> 78 error                            tzset
> 78 error In file included from ../src/bufferutil.cc:8:
> 78 error ../src/bufferutil.cc:120:25: error: ‘init’ was not declared in this scope
> 78 error  NODE_MODULE(bufferutil, init)
> 78 error                          ^~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/node.h:859:36: note: in definition of macro ‘NODE_MODULE_X’
> 78 error        (node::addon_register_func) (regfunc),                          \
> 78 error                                     ^~~~~~~
> 78 error ../src/bufferutil.cc:120:1: note: in expansion of macro ‘NODE_MODULE’
> 78 error  NODE_MODULE(bufferutil, init)
> 78 error  ^~~~~~~~~~~
> 78 error ../src/bufferutil.cc:120:25: note: suggested alternative: ‘int’
> 78 error  NODE_MODULE(bufferutil, init)
> 78 error                          ^~~~
> 78 error /home/pi/.cache/node-gyp/16.17.1/include/node/node.h:859:36: note: in definition of macro ‘NODE_MODULE_X’
> 78 error        (node::addon_register_func) (regfunc),                          \
> 78 error                                     ^~~~~~~
> 78 error ../src/bufferutil.cc:120:1: note: in expansion of macro ‘NODE_MODULE’
> 78 error  NODE_MODULE(bufferutil, init)
> 78 error  ^~~~~~~~~~~
> 78 error make: *** [bufferutil.target.mk:112: Release/obj.target/bufferutil/src/bufferutil.o] Fout 1
> 78 error gyp ERR! build error 
> 78 error gyp ERR! stack Error: `make` failed with exit code: 2
> 78 error gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
> 78 error gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
> 78 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
> 78 error gyp ERR! System Linux 5.10.63-v7+
> 78 error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
> 78 error gyp ERR! cwd /home/pi/.node-red/node_modules/bufferutil
> 78 error gyp ERR! node -v v16.17.1
> 78 error gyp ERR! node-gyp -v v9.0.0
> 78 error gyp ERR! not ok
> 79 verbose exit 1
> 80 timing npm Completed in 14949ms
> 81 verbose unfinished npm timer build 1664716211162
> 82 verbose unfinished npm timer build:deps 1664716211164
> 83 verbose unfinished npm timer build:run:install 1664716211249
> 84 verbose unfinished npm timer build:run:install:node_modules/@serialport/bindings 1664716211250
> 85 verbose unfinished npm timer build:run:install:node_modules/bufferutil 1664716211283
> 86 verbose unfinished npm timer build:run:install:node_modules/gc-stats 1664716211301
> 87 verbose code 1
> 88 error A complete log of this run can be found in:
> 88 error     /home/pi/.npm/_logs/2022-10-02T13_10_07_825Z-debug-0.log
````Preformatted text`

Can you run this from a command line:

node -p "process.arch"

It will tell you whether you are running 32bit (arm) or 64bit (arm64).

Oh, and running this should tell you whether you are running node.js 32bit or 64bit.

file `which node`

I get this on my Debian Intel server:

/usr/bin/node: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), 
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, 
BuildID[sha1]=7dddbc0a9b0312957ec8892bae8b9f98682f82a2, with debug_info, 
not stripped

At this point you should force clear the npm cache with npm cache clean --force.

If you still get errors on rebuild, do the following to delete all of the modules and reinstall them:

cd /home/pi/.node-red
rm -R node_modules
npm install
1 Like

@TotallyInformation

node -p "process.arch"

Gives me: arm

file `which node

Gives me:

/usr/bin/node: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dyna mically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 4.4.174, wit h debug_info, not stripped

OK, that's why you are running 32bit. You have the 32bit version of node.js installed. The 2nd command confirms that.

To run 64bit, you will need a newer version of Rasbian. Not sure if the full 64bit version is out of beta for the Pi 3b+, you would need to check.

I also updated my last post with help for your other error.

Here is the result:

~/.node-red $ rm -R node_modules
pi@pipi:~/.node-red $ npm install
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau

added 467 packages, and audited 468 packages in 3m

70 packages are looking for funding
  run `npm fund` for details

11 vulnerabilities (3 moderate, 5 high, 3 critical)

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

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

Run `npm audit` for details.

Yup. That worked, no more errors :slight_smile:

Ohh.... What about 11 vulnerabilities????

I did run npm audit fix

When I start flow editor, node-red-contrib-gc gives error on this node.
After removing this node, that I also don't use anymore, It looks fine now.

No, please don't do that. We've no idea why the npm/node.js teams thought that was a good idea. In truth, it mostly causes problems because the modules with outdated dependencies may have them for a reason and you can't simply update deep dependencies without potentially breaking things.

Ok, very good this is a trial run with a copy of my project.

So I will make a note of that !!
Thanks

Hopefully this will fix my problem with cpu load, but I am not sure just yet.
I will run this for a while and check everything, and then maybe tomorrow update the live project.

Thanks so far, I will report results a.s.a.p.

@BartButenaers , the Node-red-contrib-inspector cannot work on 32 bits OS? Only 64 bits?

also @TotallyInformation

Nope I use it both on a 32 bit Raspberry and a full 64 bit Raspberry.
Works fine in both cases for me.