Tellstick on buster

I know this is a longshot but thought I throw it out here and see if I could get som help.

My Pi2 crashed (SD-card), so I thought it was time to upgrade to a Pi4 while at it. Installed my Tellstick and everything is working with tdtool-command. Installed Node-Red and imported my flows. Installed my missing modules and everything worked like a charm untill the "node-red-contrib-tellstick".

Blockquote
make: *** [serialport.target.mk:112: Release/obj.target/serialport/src/serialport.o] Fel 1
make: LĂ€mnar katalogen ”/home/pi/.node-red/node_modules/serialport/build”
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.118-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/serialport
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@6.1.1 install: prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@6.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-07-21T18_59_47_209Z-debug.log

I know I had to fiddle with it last time aswell, when I installed Node-Red on my old Pi with Jester. Found a old folder with the master-release on my windows machine, but dont remember much more than that sadly. I've searched the net and tried everything I feel, but most authors seem not had tellstick up and running to begin with like I have.

I've got access to some of the files on the faulty SD-card, is there a way to copy/paste something to trick my new Pi4 (I've tried copy the ".node-red"-folder and things like that but didnt work).

As I said it might be a long shot, doesnt seems like many runs old tellsticks anymore. I'm just not ready to let em go yet :slight_smile:
Since I did got it to work last time it nags me that I have to give up this time.

All help appreciated!
Thanks
/Tomas

Go to your .node-red folder and delete the folder node_modules/serialport, then run
npm install node-red-contrib-serialport
and post the full output here. Use the </> button and paste the log where it says.

2 Likes

Once you got it working again, make yourself a favor, go purchase a small usb reader and an additional sd card. Use the utility "SD Card Copier" included in Raspberry Pi OS and make a full backup copy of your sd card

Repeat after each major change. So simple, so good to have. Just in case...

1 Like
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/node-red-contrib-serialport - Not found
npm ERR! 404
npm ERR! 404  'node-red-contrib-serialport@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-07-22T18_27_01_064Z-debug.log

@krambriw, yea...its just that I always forget to do the "repeating" :slight_smile:
My last backup was from 2016..

ok, got this now when I copied from the documentation on the serial-module;

pi@Hallon:~/.node-red $ npm i node-red-node-serialport

> serialport@6.2.2 install /home/pi/.node-red/node_modules/serialport
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.18.2 runtime=node arch=arm platform=linux)
make: GĂ„r till katalogen ”/home/pi/.node-red/node_modules/serialport/build”
  CXX(target) Release/obj.target/serialport/src/serialport.o
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:41:48: error: no matching function for call to ‘v8::Value::ToString()’
   v8::String::Utf8Value path(info[0]->ToString());
                                                ^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2668:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                            ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2668:44: note:   candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2684:31: note: candidate: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’
                 Local<String> ToString(Isolate* isolate) const);
                               ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2684:31: note:   candidate expects 1 argument, 0 provided
                 Local<String> ToString(Isolate* isolate) const);
                               ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/serialport.cpp:48:53: error: no matching function for call to ‘v8::Value::ToObject()’
   v8::Local<v8::Object> options = info[1]->ToObject();
                                                     ^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                            ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note:   candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note: candidate: ‘v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const’
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note:   candidate expects 1 argument, 0 provided
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/serialport.cpp:78:69: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
                                                                     ^~~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterOpen(uv_work_t*)’:
../src/serialport.cpp:95:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   data->callback.Call(2, argv);
                              ^
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:113:53: error: no matching function for call to ‘v8::Value::ToObject()’
   v8::Local<v8::Object> options = info[1]->ToObject();
                                                     ^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                            ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note:   candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note: candidate: ‘v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const’
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note:   candidate expects 1 argument, 0 provided
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/serialport.cpp:135:71: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
                                                                       ^~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterUpdate(uv_work_t*)’:
../src/serialport.cpp:150:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   data->callback.Call(1, argv);
                              ^
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:175:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
                                                                      ^~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterClose(uv_work_t*)’:
../src/serialport.cpp:188:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   data->callback.Call(1, argv);
                              ^
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:215:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
                                                                      ^~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterFlush(uv_work_t*)’:
../src/serialport.cpp:231:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   data->callback.Call(1, argv);
                              ^
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:250:53: error: no matching function for call to ‘v8::Value::ToObject()’
   v8::Local<v8::Object> options = info[1]->ToObject();
                                                     ^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                            ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2672:44: note:   candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note: candidate: ‘v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const’
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:2686:31: note:   candidate expects 1 argument, 0 provided
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^~~~~~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/serialport.cpp:270:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
                                                                    ^~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterSet(uv_work_t*)’:
../src/serialport.cpp:285:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   data->callback.Call(1, argv);
                              ^
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:314:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
                                                                    ^~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterGet(uv_work_t*)’:
../src/serialport.cpp:329:96: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
                                                                                                ^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:3499:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/serialport.cpp:330:96: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
                                                                                                ^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:3499:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/serialport.cpp:331:96: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
                                                                                                ^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:3499:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/serialport.cpp:336:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   data->callback.Call(2, argv);
                              ^
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:363:76: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
                                                                            ^~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterGetBaudRate(uv_work_t*)’:
../src/serialport.cpp:378:106: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
                                                                                                          ^
In file included from /home/pi/.cache/node-gyp/12.18.2/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.18.2/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/v8.h:3499:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/home/pi/.cache/node-gyp/12.18.2/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/serialport.cpp:383:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   data->callback.Call(2, argv);
                              ^
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:409:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
                                                                      ^~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterDrain(uv_work_t*)’:
../src/serialport.cpp:424:30: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   data->callback.Call(1, argv);
                              ^
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../nan/nan.h:1742:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/serialport.cpp: At global scope:
../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of ‘ToParityEnum’ [-Wparentheses]
 SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
                            ^
../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of ‘ToStopBitEnum’ [-Wparentheses]
 SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
                              ^
../src/serialport.cpp:460:17: error: variable or field ‘init’ declared void
   void init(v8::Handle<v8::Object> target) {
                 ^~~~~~
../src/serialport.cpp:460:17: error: ‘Handle’ is not a member of ‘v8’
../src/serialport.cpp:460:34: error: expected primary-expression before ‘>’ token
   void init(v8::Handle<v8::Object> target) {
                                  ^
../src/serialport.cpp:460:36: error: ‘target’ was not declared in this scope
   void init(v8::Handle<v8::Object> target) {
                                    ^~~~~~
../src/serialport.cpp:460:36: note: suggested alternative: ‘tzset’
   void init(v8::Handle<v8::Object> target) {
                                    ^~~~~~
                                    tzset
In file included from ../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../src/serialport.cpp:485:25: error: ‘init’ was not declared in this scope
 NODE_MODULE(serialport, init);
                         ^~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/node.h:608:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../src/serialport.cpp:485:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(serialport, init);
 ^~~~~~~~~~~
../src/serialport.cpp:485:25: note: suggested alternative: ‘int’
 NODE_MODULE(serialport, init);
                         ^~~~
/home/pi/.cache/node-gyp/12.18.2/include/node/node.h:608:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../src/serialport.cpp:485:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(serialport, init);
 ^~~~~~~~~~~
make: *** [serialport.target.mk:112: Release/obj.target/serialport/src/serialport.o] Fel 1
make: LĂ€mnar katalogen ”/home/pi/.node-red/node_modules/serialport/build”
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.118-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/serialport
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN node-red-node-ui-list@0.2.5 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-node-ui-table@0.3.0 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@6.2.2 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@6.2.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-07-22T18_39_47_872Z-debug.log

Sorry, I put the wrong node name in, which is why it didn't work the first time.

Eh? it is trying to install an old version (it should be 8.0.8). I suspect the file .node-red/package-lock.json may be calling for an old version of the serial port node. That file can safely be deleted so delete it and try the install again. If it still fails then use
npm remove node-red-node-serialport
and then install it again.

Or use npm i node-red-node-serialport@latest

1 Like

That went better I think?

pi@Hallon:~/.node-red $ npm i node-red-node-serialport@latest

> @serialport/bindings@8.0.8 install /home/pi/.node-red/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.18.2 runtime=node arch=arm libc= platform=linux)
make: GĂ„r till katalogen ”/home/pi/.node-red/node_modules/@serialport/bindings/build”
  CXX(target) Release/obj.target/bindings/src/serialport.o
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:78:69: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
                                                                     ^~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:135:71: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
                                                                       ^~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:175:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
                                                                      ^~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:215:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
                                                                      ^~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:270:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
                                                                    ^~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:314:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
                                                                    ^~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:363:76: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
                                                                            ^~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:409:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
                                                                      ^~~~~~~~~~~~~~
../src/serialport.cpp: At global scope:
../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of ‘ToParityEnum’ [-Wparentheses]
 SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
                            ^
../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of ‘ToStopBitEnum’ [-Wparentheses]
 SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
                              ^
In file included from ../../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/node.h:608:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/home/pi/.cache/node-gyp/12.18.2/include/node/node.h:642:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/serialport.cpp:483:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(serialport, init);
 ^~~~~~~~~~~
  CXX(target) Release/obj.target/bindings/src/serialport_unix.o
In file included from ../src/serialport.h:6,
                 from ../src/serialport_unix.cpp:2:
../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
../src/serialport_unix.cpp: In function ‘int setup(int, OpenBaton*)’:
../src/serialport_unix.cpp:176:60: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=]
     snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp:176:13: note: ‘snprintf’ output 20 or more bytes (assuming 1043) into a destination of size 1024
     snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp: In function ‘void EIO_Open(uv_work_t*)’:
../src/serialport_unix.cpp:86:60: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1003 [-Wformat-truncation=]
     snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp:86:13: note: ‘snprintf’ output 22 or more bytes (assuming 1045) into a destination of size 1024
     snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/bindings/src/poller.o
In file included from ../src/poller.cpp:1:
../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
  CXX(target) Release/obj.target/bindings/src/serialport_linux.o
  SOLINK_MODULE(target) Release/obj.target/bindings.node
  COPY Release/bindings.node
make: LĂ€mnar katalogen ”/home/pi/.node-red/node_modules/@serialport/bindings/build”

> serialport@8.0.8 postinstall /home/pi/.node-red/node_modules/serialport
> node thank-you.js

Thank you for using serialport!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/serialport/donate


npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN node-red-node-ui-list@0.2.5 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-node-ui-table@0.3.0 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ node-red-node-serialport@0.10.3
added 46 packages from 38 contributors, removed 106 packages and audited 307 packages in 27.277s

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

found 16 vulnerabilities (13 low, 2 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details
pi@Hallon:~/.node-red $ npm install node-red-contrib-tellstick
npm WARN node-red-node-ui-list@0.2.5 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-node-ui-table@0.3.0 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ node-red-contrib-tellstick@2.1.3
updated 1 package and audited 307 packages in 7.491s

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

found 16 vulnerabilities (13 low, 2 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Even the tellstick module didnt complain that much.
Node-red still complains about missing modules thou :frowning:
Might be that I've wreck node-red with all my other tries to get it to work, copying files all over the places.

Well that went better, even the tellstick module didnt complain much.
Still Node-red complains about missing modules thou :frowning:

pi@Hallon:~/.node-red $ npm i node-red-node-serialport@latest

> @serialport/bindings@8.0.8 install /home/pi/.node-red/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.18.2 runtime=node arch=arm libc= platform=linux)
make: GĂ„r till katalogen ”/home/pi/.node-red/node_modules/@serialport/bindings/build”
  CXX(target) Release/obj.target/bindings/src/serialport.o
In file included from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:78:69: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
                                                                     ^~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:135:71: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
                                                                       ^~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:175:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
                                                                      ^~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:215:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
                                                                      ^~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:270:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
                                                                    ^~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:314:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
                                                                    ^~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:363:76: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
                                                                            ^~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:409:70: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
                                                                      ^~~~~~~~~~~~~~
../src/serialport.cpp: At global scope:
../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of ‘ToParityEnum’ [-Wparentheses]
 SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
                            ^
../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of ‘ToStopBitEnum’ [-Wparentheses]
 SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
                              ^
In file included from ../../../nan/nan.h:56,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.18.2/include/node/node.h:608:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/home/pi/.cache/node-gyp/12.18.2/include/node/node.h:642:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/serialport.cpp:483:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(serialport, init);
 ^~~~~~~~~~~
  CXX(target) Release/obj.target/bindings/src/serialport_unix.o
In file included from ../src/serialport.h:6,
                 from ../src/serialport_unix.cpp:2:
../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
../src/serialport_unix.cpp: In function ‘int setup(int, OpenBaton*)’:
../src/serialport_unix.cpp:176:60: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=]
     snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp:176:13: note: ‘snprintf’ output 20 or more bytes (assuming 1043) into a destination of size 1024
     snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp: In function ‘void EIO_Open(uv_work_t*)’:
../src/serialport_unix.cpp:86:60: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1003 [-Wformat-truncation=]
     snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp:86:13: note: ‘snprintf’ output 22 or more bytes (assuming 1045) into a destination of size 1024
     snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/bindings/src/poller.o
In file included from ../src/poller.cpp:1:
../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
  CXX(target) Release/obj.target/bindings/src/serialport_linux.o
  SOLINK_MODULE(target) Release/obj.target/bindings.node
  COPY Release/bindings.node
make: LĂ€mnar katalogen ”/home/pi/.node-red/node_modules/@serialport/bindings/build”

> serialport@8.0.8 postinstall /home/pi/.node-red/node_modules/serialport
> node thank-you.js

Thank you for using serialport!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/serialport/donate


npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN node-red-node-ui-list@0.2.5 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-node-ui-table@0.3.0 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ node-red-node-serialport@0.10.3
added 46 packages from 38 contributors, removed 106 packages and audited 307 packages in 27.277s

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

found 16 vulnerabilities (13 low, 2 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details
pi@Hallon:~/.node-red $ npm install node-red-contrib-tellstick
npm WARN node-red-node-ui-list@0.2.5 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-node-ui-table@0.3.0 requires a peer of node-red-dashboard@>2.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

+ node-red-contrib-tellstick@2.1.3
updated 1 package and audited 307 packages in 7.491s

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

found 16 vulnerabilities (13 low, 2 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Might just be that I've ruined my node-red with all my attempts before this.

noticed this when browsing the pallette in node-red;

[object Object]
Error: The module '/home/pi/.node-red/node_modules/telldus/build/Release/telldus.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 57. 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`). (line:3)
[object Object]

npm rebuild didnt work...

I think the problem may be that package-lock.json has old versions of nodes specified I suggest deleting that file (package-lock.json, not package.json), and running
npm install
If it still fails then delete the lock file again and also delete the folder .node-red/node_modules and run npm install.

Can you explain what you did and what errors you see when rebuilding?

Note the lines above, saying that it has installed successfully, you can ignore the errors above that provided it says it has installed.
Don't forget to restart node-red after doing any npm stuff manually. As the new stuff isn't used until you restart.

You had restarted node red I assume.

1 Like

Tried several times with removing node_modules and installing serialport-module but didnt work so I removed node-red, node, nodejs and npm. then I ran the install-script again, updated npm, installed serial@latest and tellstick@latest.

Now it works :slight_smile:
Thanks for your help!

Did you remove package-lock.json as I suggested?

yes, and restarted node-red :wink:
But it didnt help sadly...couldnt remove serial-module in the end so thats why I decided to remove node-red all together

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