# SDS011 contrib, problem with installation

**URL:** <https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450>\
**Category:** General\
**Created:** [9 February 2020 11:32 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450 "2020-02-09T11:32:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [9 February 2020 11:32 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/1 "2020-02-09T11:32:30Z")

</div>

Hi there.

I'm trying to install the SDS011 sensor node in my rapsberry pi3, you can find it here: [https://flows.nodered.org/node/node-red-contrib-sds011](https://flows.nodered.org/node/node-red-contrib-sds011)  
Actually i'm running npm@6.13.4 and node@v12.15.0.

I wish that it's not a problem with compatibility between the node and my version of nodejs, or something like this.

When i try to run the script: npm install node-red-contrib-sds011, this is the answer.

Any ideas?  
Thanks.

```auto
> serialport@6.2.2 install /home/pi/node_modules/node-red-contrib-sds011/node_modules/serialport
> prebuild-install || node-gyp rebuild
>prebuild-install WARN install No prebuilt binaries found (target=12.15.0 runtime=node arch=arm platform=linux)
make: ingresso nella directory "/home/pi/node_modules/node-red-contrib-sds011/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:2298: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.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2572: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.15.0/include/node/v8.h:2572:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2588: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.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__ ((deprecated(message)))
   ^ ~~~~~~~~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2588:31: note: candidate expects 1 argument, 0 provided
                 Local<String> ToString(Isolate* isolate) const);
                               ^ ~~~~~~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8config.h:311: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.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2576: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.15.0/include/node/v8.h:2576:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2590: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.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__ ((deprecated(message)))
   ^ ~~~~~~~~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2590:31: note: candidate expects 1 argument, 0 provided
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^ ~~~~~~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8config.h:311: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:1740: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.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2576: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.15.0/include/node/v8.h:2576:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2590: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.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__ ((deprecated(message)))
   ^ ~~~~~~~~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2590:31: note: candidate expects 1 argument, 0 provided
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^ ~~~~~~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8config.h:311: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:1740: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:1740: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:1740: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.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2576: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.15.0/include/node/v8.h:2576:44: note: candidate expects 1 argument, 0 provided
In file included from /home/pi/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2590: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.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__ ((deprecated(message)))
   ^ ~~~~~~~~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:2590:31: note: candidate expects 1 argument, 0 provided
                 Local<Object> ToObject(Isolate* isolate) const);
                               ^ ~~~~~~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8config.h:311: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:1740: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]
 an::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
                                                                              ^
In file included from /home/pi/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:3403:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8config.h:311: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]
 an::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
                                                                              ^
In file included from /home/pi/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:3403:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8config.h:311: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]
 an::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
                                                                              ^
In file included from /home/pi/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:3403:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8config.h:311: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:1740: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]
 eue_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]
 ::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
                                                                              ^
In file included from /home/pi/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from /home/pi/.cache/node-gyp/12.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:3403:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8config.h:311: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:1740: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:1740: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:54,
                 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.15.0/include/node/node.h:560: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.15.0/include/node/node.h:560: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);
 ^ ~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/12.15.0/include/node/node.h:63,
                 from ../../../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/pi/.cache/node-gyp/12.15.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../../../nan/nan_object_wrap.h:65:61: required from here
/home/pi/.cache/node-gyp/12.15.0/include/node/v8.h:10004:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
make: *** [serialport.target.mk:110: Release/obj.target/serialport/src/serialport.o] Error 1
make: uscita dalla directory "/home/pi/node_modules/node-red-contrib-sds011/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/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.97-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/node_modules/node-red-contrib-sds011/node_modules/serialport
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi 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-02-09T11_08_06_720Z-debug.log

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 February 2020 11:51 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/2 "2020-02-09T11:51:44Z")

</div>

You should be in the .node-red directory when you run the npm install command, I suspect you may still get the error though.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 February 2020 11:52 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/3 "2020-02-09T11:52:48Z")

</div>

That node depends on serialport v6 - I think you will need version 7 or even 8 in order to compile on nodejs 12. It may work if you drop back to node 10.

---

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [9 February 2020 12:36 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/4 "2020-02-09T12:36:36Z")

</div>

thx.

how may i do that? I try with:

> curl -sL [https://deb.nodesource.com/setup\_10.x](https://deb.nodesource.com/setup_10.x) | sudo bash -

but the node version is still v12.15.0

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 February 2020 12:39 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/5 "2020-02-09T12:39:05Z")

</div>

You probably need to uninstall 12 first and remove nodesource.list from /etc/apt/sources.list.d dir then retry that command

---

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [9 February 2020 13:40 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/6 "2020-02-09T13:40:18Z")

</div>

> [@dceejay](#):
>
> /etc/apt/sources.list.d

tried, but still v12.15.0

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 February 2020 13:48 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/7 "2020-02-09T13:48:43Z")

</div>

> [@calcioscacchi](#):
>
> node-red-contrib-sds011

What does  
`apt policy nodejs`  
show? Post it here.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 February 2020 13:51 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/8 "2020-02-09T13:51:17Z")

</div>

Also you did run  
`sudo apt install nodejs`  
after running the curl command I hope.

---

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [9 February 2020 14:04 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/9 "2020-02-09T14:04:23Z")

</div>

ok, i tried to uninstall nodejs following this guide:

> **[Completely removing Node.js and Npm - Hungred Dot Com](https://www.hungred.com/how-to/completely-removing-nodejs-npm/)**
>
> Apparently i needed to completely remove my node.js and npm installation in my mac mavericks because i have installed various version of node.js from brew and nodejs.org website. After removing node from Brew, i am still able to access my node on my...

then i run:

`curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -`  
`sudo apt-get install nodejs`

If i try to run node-v or node --version, it shows an error:

`bash: /usr/local/bin/node: File or directory doesn't exist` (translation from italian)

but, if i run  
`apt policy nodejs`

this is the answer:

```auto
nodejs:
  Installato: 10.19.0-1nodesource1
  Candidato: 10.19.0-1nodesource1
  Tabella versione:
 *** 10.19.0-1nodesource1 500
        500 https://deb.nodesource.com/node_10.x buster/main armhf Packages
        100 /var/lib/dpkg/status
     10.15.2~dfsg-2+rpi1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages

```

---

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [9 February 2020 14:21 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/10 "2020-02-09T14:21:21Z")

</div>

I've tried to install node red and the node for my sensor again.

Result by installing the sensor node: no errors but some warnings. I have suppose to see the node in my node red dashboard (the one that i reach with [http://myipaddres:1880](http://myipaddres:1880)), but it doesn't appear.

```auto
> serialport@6.2.2 install /home/pi/node_modules/serialport
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.19.0 runtime=node arch=arm platform=linux)
make: ingresso nella directory "/home/pi/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:2298: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:49: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
   v8::String::Utf8Value path(info[0]->ToString());
                                                 ^
In file included from /home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:26,
                 from /home/pi/.cache/node-gyp/10.19.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:2892:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^ ~~~~~~~~
/home/pi/.cache/node-gyp/10.19.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__ ((deprecated(message)))
   ^ ~~~~~~~~~../src/serialport.cpp:48:53: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   v8::Local<v8::Object> options = info[1]->ToObject();
                                                     ^
In file included from /home/pi/.cache/node-gyp/10.19.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^ ~~~~../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:1740: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: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   v8::Local<v8::Object> options = info[1]->ToObject();
                                                     ^
In file included from /home/pi/.cache/node-gyp/10.19.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^ ~~~~../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:1740: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:1740: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:1740: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: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   v8::Local<v8::Object> options = info[1]->ToObject();
                                                     ^
In file included from /home/pi/.cache/node-gyp/10.19.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^ ~~~~../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:1740: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: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:1740: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]
 eue_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: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:1740: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:1740: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)) {
                              ^
In file included from ../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/10.19.0/include/node/node.h:573:43: warning: cast between incompatible function types from ‘void (*)(v8::Handle<v8::Object>)’ {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/10.19.0/include/node/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
   ^ ~~~~~~~~~~~~../src/serialport.cpp:485:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(serialport, init);
 ^ ~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/10.19.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/pi/.cache/node-gyp/10.19.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:65:61: required from here
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
  CXX(target) Release/obj.target/serialport/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:2298: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)
                                                              ^
In file included from /home/pi/.cache/node-gyp/10.19.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/serialport.h:6,
                 from ../src/serialport_unix.cpp:2:
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/pi/.cache/node-gyp/10.19.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:65:61: required from here
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
../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/serialport/src/poller.o
In file included from ../src/poller.cpp:1:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298: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/poller.cpp: In static member function ‘static void Poller::onData(uv_poll_t*, int, int)’:
../src/poller.cpp:69:29: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   obj->callback.Call(2, argv);
                             ^
In file included from ../src/poller.cpp:1:
../../nan/nan.h:1740:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
In file included from /home/pi/.cache/node-gyp/10.19.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/poller.cpp:1:
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/pi/.cache/node-gyp/10.19.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:65:61: required from here
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
  CXX(target) Release/obj.target/serialport/src/serialport_linux.o
  SOLINK_MODULE(target) Release/obj.target/serialport.node
  COPY Release/serialport.node
make: uscita dalla directory "/home/pi/node_modules/serialport/build"
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

+ node-red-contrib-sds011@0.0.1
updated 1 package, moved 19 packages and audited 3026 packages in 31.723s
found 0 vulnerabilities

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 February 2020 14:47 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/11 "2020-02-09T14:47:00Z")

</div>

Did you do the following, which is necessary after changing the nodejs version?  
First stop node red then reinstall node-red to build it with the new nodejs and then rebuild any other nodes installed

```auto
sudo npm install -g --unsafe-perm node-red
cd ~/.node-red
npm rebuild

```

then restart node-red

---

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [9 February 2020 15:08 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/12 "2020-02-09T15:08:39Z")

</div>

did it.

But still i don't see the node in my node list.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 February 2020 16:20 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/13 "2020-02-09T16:20:38Z")

</div>

Stop node red then start it using  
`node-red-start`  
and post the full output here. Also post the result of  
`npm list node-red-contrib-sds011`

---

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [9 February 2020 23:38 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/14 "2020-02-09T23:38:54Z")

</div>

Here you have the output for `node-red-start` command. I cover the ip address with "x".

```auto
Start Node-RED
 
Once Node-RED has started, point a browser at http://xxx.xxx.x.xxx:1880
On Pi Node-RED works better with the Firefox or Chrome browser
 
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
 
Starting as a systemd service.
10 Feb 00:34:14 - [info]
Welcome to Node-RED
===================
10 Feb 00:34:14 - [info] Node-RED version: v1.0.3
10 Feb 00:34:14 - [info] Node.js version: v10.19.0
10 Feb 00:34:14 - [info] Linux 4.19.97-v7+ arm LE
10 Feb 00:34:15 - [info] Loading palette nodes
10 Feb 00:34:18 - [info] Settings file : /home/pi/.node-red/settings.js
10 Feb 00:34:18 - [info] Context store : 'default' [module=memory]
10 Feb 00:34:18 - [info] User directory : /home/pi/.node-red
10 Feb 00:34:18 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 Feb 00:34:18 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
10 Feb 00:34:18 - [info] Creating new flow file
10 Feb 00:34:18 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
10 Feb 00:34:18 - [info] Starting flows
10 Feb 00:34:18 - [info] Started flows
10 Feb 00:34:18 - [info] Server now running at http://xxx.x.x.x:1880/

```

results for `npm list node-red-contrib-sds011` command:

```auto
/home/pi
└── node-red-contrib-sds011@0.0.1

```

And with this results, maybe i understand the problem... is that the right path? 🙂

Thanks for helping.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [10 February 2020 00:23 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/15 "2020-02-10T00:23:31Z")

</div>

If you install nodes manually, on the Pi always change to the `.node-red` directory before using the `npm` command. You might want to remove that node, `cd .node-red` and reinstall it.

---

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [10 February 2020 00:46 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/16 "2020-02-10T00:46:12Z")

</div>

And finally, i got it!

Just give me some hours to test it.

Thankyou so much to all of you for the help!

---

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [11 February 2020 20:19 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/17 "2020-02-11T20:19:18Z")

</div>

Ok, here i am...

thanks to you, I think that i'm at a good point (and consider that it's my firt rednode project.

Actually, i try to set a flow implementing a serial input, the sensor node, and 3 payloads.

I set the serial node with this sets

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/76773e5f756ce56a2d4118b34795eeefae9652cd.png)

and I hadn't touch the SDS011 configuration. I tried to deploy, and I show you the results... ideas? ☹

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/7/47db751c22867eaaac75d985f3680e3951185513.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 February 2020 20:50 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/18 "2020-02-11T20:50:14Z")

</div>

Looks like incorrect baud rate. What does a debug node on the serial port show.

---

<div class="post-metadata">

**Author:** ![calcioscacchi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/calcioscacchi/32/16898_2.png) [@calcioscacchi](https://discourse.nodered.org/u/calcioscacchi)\
**Post date:** [11 February 2020 21:01 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/19 "2020-02-11T21:01:38Z")

</div>

Hope that i set the flow in the correct way to answer you.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/6/06eb4d99b78fe3e43d6a680d18f50e07ce4eb022.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1d60efda64f55f51906a2cccbad7c562bc27ffd3.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 February 2020 21:14 UTC](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450/20 "2020-02-11T21:14:52Z")

</div>

Presumably that is not what you are expecting. Are you sure the baud rate is correct?

[Next page](https://discourse.nodered.org/t/sds011-contrib-problem-with-installation/21450.md?page=2)
