Hi,
Hi,
I created a flow with node-red-contrib-mpu9250 inside two months ago. It worked fine.
But then, today, after I exported the flow and imported it to another raspberry pi, I couldn't install the
node-red-contrib-mpu9250
Below is the error.
I have also tried npm installl node-red-contrib-mpu9250, still no luck....
Btw, is it possible to export the flow with the library inside?
Thanks,
2021-10-24T11:49:51.820Z Install : node-red-contrib-mpu9250 2.0.2
2021-10-24T11:49:52.581Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-mpu9250@2.0.2
2021-10-24T11:50:00.450Z [err] npm
2021-10-24T11:50:00.451Z [err] WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
2021-10-24T11:50:02.250Z [out]
2021-10-24T11:50:02.250Z [out] > sleep@3.0.0 install /root/.node-red/node_modules/sleep
2021-10-24T11:50:02.250Z [out] > node-gyp rebuild
2021-10-24T11:50:02.250Z [out]
2021-10-24T11:50:03.640Z [out] make: Entering directory '/root/.node-red/node_modules/sleep/build'
2021-10-24T11:50:03.643Z [out] CXX(target) Release/obj.target/node_sleep/sleep.o
2021-10-24T11:50:05.116Z [err] ../sleep.cc:6:11: error: ‘v8::Handle’ has not been declared
2021-10-24T11:50:05.116Z [err] using v8::Handle;
2021-10-24T11:50:05.116Z [err] ^~~~~~
2021-10-24T11:50:05.121Z [err] ../sleep.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Sleep(Nan::NAN_METHOD_ARGS_TYPE)’:
2021-10-24T11:50:05.121Z [err] ../sleep.cc:42:30: error: no matching function for call to ‘v8::Value::Uint32Value()’
2021-10-24T11:50:05.121Z [err] sleep(info[0]->Uint32Value());
2021-10-24T11:50:05.121Z [err] ^
2021-10-24T11:50:05.121Z [err] In file included from /root/.cache/node-gyp/14.18.1/include/node/node.h:67,
2021-10-24T11:50:05.121Z [err] from ../../nan/nan.h:58,
2021-10-24T11:50:05.121Z [err] from ../sleep.cc:2:
2021-10-24T11:50:05.121Z [err] /root/.cache/node-gyp/14.18.1/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
2021-10-24T11:50:05.121Z [err] V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
2021-10-24T11:50:05.121Z [err] ^~~~~~~~~~~
2021-10-24T11:50:05.121Z [err] /root/.cache/node-gyp/14.18.1/include/node/v8.h:2866:41: note: candidate expects 1 argument, 0 provided
2021-10-24T11:50:05.123Z [err] ../sleep.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE USleep(Nan::NAN_METHOD_ARGS_TYPE)’:
2021-10-24T11:50:05.123Z [err] ../sleep.cc:54:31: error: no matching function for call to ‘v8::Value::Uint32Value()’
2021-10-24T11:50:05.123Z [err] usleep(info[0]->Uint32Value());
2021-10-24T11:50:05.123Z [err] ^
2021-10-24T11:50:05.123Z [err] In file included from /root/.cache/node-gyp/14.18.1/include/node/node.h:67,
2021-10-24T11:50:05.123Z [err] from ../../nan/nan.h:58,
2021-10-24T11:50:05.123Z [err] from ../sleep.cc:2:
2021-10-24T11:50:05.123Z [err] /root/.cache/node-gyp/14.18.1/include/node/v8.h:2866:41: note: candidate: ‘v8::Maybe<unsigned int> v8::Value::Uint32Value(v8::Local<v8::Context>) const’
2021-10-24T11:50:05.123Z [err] V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
2021-10-24T11:50:05.123Z [err] ^~~~~~~~~~~
2021-10-24T11:50:05.123Z [err] /root/.cache/node-gyp/14.18.1/include/node/v8.h:2866:41: note: candidate expects 1 argument, 0 provided
2021-10-24T11:50:05.124Z [err] ../sleep.cc: In function ‘void init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
2021-10-24T11:50:05.124Z [err] ../sleep.cc:62:52: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
2021-10-24T11:50:05.124Z [err] Nan::New<FunctionTemplate>(Sleep)->GetFunction());
2021-10-24T11:50:05.124Z [err] ^
2021-10-24T11:50:05.124Z [err] In file included from /root/.cache/node-gyp/14.18.1/include/node/node.h:67,
2021-10-24T11:50:05.124Z [err] from ../../nan/nan.h:58,
2021-10-24T11:50:05.124Z [err] from ../sleep.cc:2:
2021-10-24T11:50:05.124Z [err] /root/.cache/node-gyp/14.18.1/include/node/v8.h:6482:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
2021-10-24T11:50:05.124Z [err] V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
2021-10-24T11:50:05.124Z [err] ^~~~~~~~~~~
2021-10-24T11:50:05.124Z [err] /root/.cache/node-gyp/14.18.1/include/node/v8.h:6482:46: note: candidate expects 1 argument, 0 provided
2021-10-24T11:50:05.125Z [err] ../sleep.cc:64:53: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
2021-10-24T11:50:05.125Z [err] Nan::New<FunctionTemplate>(USleep)->GetFunction());
2021-10-24T11:50:05.125Z [err] ^
2021-10-24T11:50:05.125Z [err] In file included from /root/.cache/node-gyp/14.18.1/include/node/node.h:67,
2021-10-24T11:50:05.125Z [err] from ../../nan/nan.h:58,
2021-10-24T11:50:05.125Z [err] from ../sleep.cc:2:
2021-10-24T11:50:05.125Z [err] /root/.cache/node-gyp/14.18.1/include/node/v8.h:6482:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
2021-10-24T11:50:05.125Z [err] V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
2021-10-24T11:50:05.125Z [err] ^~~~~~~~~~~
2021-10-24T11:50:05.125Z [err] /root/.cache/node-gyp/14.18.1/include/node/v8.h:6482:46: note: candidate expects 1 argument, 0 provided
2021-10-24T11:50:05.126Z [err] In file included from ../../nan/nan.h:58,
2021-10-24T11:50:05.126Z [err] from ../sleep.cc:2:
2021-10-24T11:50:05.126Z [err] ../sleep.cc: At global scope:
2021-10-24T11:50:05.126Z [err] /root/.cache/node-gyp/14.18.1/include/node/node.h:787: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]
2021-10-24T11:50:05.126Z [err] (node::addon_register_func) (regfunc), \
2021-10-24T11:50:05.126Z [err] ^
2021-10-24T11:50:05.126Z [err] /root/.cache/node-gyp/14.18.1/include/node/node.h:821:3: note: in expansion of macro ‘NODE_MODULE_X’
2021-10-24T11:50:05.126Z [err] NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
2021-10-24T11:50:05.126Z [err] ^~~~~~~~~~~~~
2021-10-24T11:50:05.126Z [err] ../sleep.cc:68:1: note: in expansion of macro ‘NODE_MODULE’
2021-10-24T11:50:05.126Z [err] NODE_MODULE(node_sleep, init)
2021-10-24T11:50:05.126Z [err] ^~~~~~~~~~~
2021-10-24T11:50:05.321Z [err] make: *** [node_sleep.target.mk:109: Release/obj.target/node_sleep/sleep.o] Error 1
2021-10-24T11:50:05.321Z [out] make: Leaving directory '/root/.node-red/node_modules/sleep/build'
2021-10-24T11:50:05.323Z [err] gyp
2021-10-24T11:50:05.324Z [err]
2021-10-24T11:50:05.324Z [err] ERR! build error
2021-10-24T11:50:05.326Z [err] gyp
2021-10-24T11:50:05.326Z [err] ERR! stack Error: `make` failed with exit code: 2
2021-10-24T11:50:05.326Z [err] gyp
2021-10-24T11:50:05.326Z [err] ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
2021-10-24T11:50:05.326Z [err] gyp
2021-10-24T11:50:05.326Z [err] ERR! stack at ChildProcess.emit (events.js:400:28)
2021-10-24T11:50:05.326Z [err] gyp ERR! stack
2021-10-24T11:50:05.326Z [err] at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
2021-10-24T11:50:05.327Z [err] gyp
2021-10-24T11:50:05.327Z [err] ERR! System Linux 5.10.17-v7l+
2021-10-24T11:50:05.327Z [err] gyp ERR! command
2021-10-24T11:50:05.327Z [err] "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-10-24T11:50:05.327Z [err] gyp
2021-10-24T11:50:05.327Z [err] ERR! cwd /root/.node-red/node_modules/sleep
2021-10-24T11:50:05.327Z [err] gyp ERR! node -v v14.18.1
2021-10-24T11:50:05.328Z [err] gyp ERR! node-gyp -v v5.1.0
2021-10-24T11:50:05.328Z [err] gyp ERR! not ok
2021-10-24T11:50:05.602Z [err] npm
2021-10-24T11:50:05.602Z [err] ERR! code ELIFECYCLE
2021-10-24T11:50:05.602Z [err] npm ERR!
2021-10-24T11:50:05.602Z [err] errno 1
2021-10-24T11:50:05.630Z [err] npm ERR!
2021-10-24T11:50:05.630Z [err] sleep@3.0.0 install: `node-gyp rebuild`
2021-10-24T11:50:05.630Z [err] npm ERR! Exit status 1
2021-10-24T11:50:05.630Z [err] npm
2021-10-24T11:50:05.630Z [err] ERR!
2021-10-24T11:50:05.630Z [err] npm ERR! Failed at the sleep@3.0.0 install script.
2021-10-24T11:50:05.630Z [err] npm
2021-10-24T11:50:05.630Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-10-24T11:50:05.650Z [err]
2021-10-24T11:50:05.650Z [err] npm ERR! A complete log of this run can be found in:
2021-10-24T11:50:05.650Z [err] npm ERR! /root/.npm/_logs/2021-10-24T11_50_05_634Z-debug.log
2021-10-24T11:50:05.664Z rc=1