Closed liborp closed 7 years ago
This package is most likely depending on an older version of i2c that isn't compatible with the newer node version.
Thank you Kelly for the information. All the best Libor
If you fork the package, you likely can update i2c to a newer version and it should work correctly.
During the install o node-red-contrib-bmp085 module I had a strange error. Have you any advice where the problem is? Thank you in advance. LP.
2 Apr 10:08:53 - [info] Installing module: node-red-contrib-bmp085 2 Apr 10:09:37 - [warn] Installation of module node-red-contrib-bmp085 failed: 2 Apr 10:09:37 - [warn] ------------------------------------------ 2 Apr 10:09:37 - [warn] Error: Command failed: npm install --production node-red-contrib-bmp085 ../src/i2c.cc: In function ‘void setAddress(int8_t)’: ../src/i2c.cc:21:28: error: ‘New’ is not a member of ‘v8::String’ Exception::TypeError(String::New("Failed to set address")) ^ ../src/i2c.cc:22:5: error: ‘ThrowException’ was not declared in this scope ); ^ ../src/i2c.cc: At global scope: ../src/i2c.cc:26:32: error: ‘Arguments’ does not name a type Handle SetAddress(const Arguments& args) {
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h: In function ‘v8::Handle SetAddress(const int&)’:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:908:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/i2c.cc:27:15: error: within this context
HandleScope scope;
^
../src/i2c.cc:29:16: error: invalid types ‘const int[int]’ for array subscript
addr = args[0]->Int32Value();
^
../src/i2c.cc:32:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(Undefined());
^
../src/i2c.cc:32:32: error: too few arguments to function ‘v8::Local v8::Undefined(v8::Isolate)’
return scope.Close(Undefined());
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:327:27: note: declared here
friend Local Undefined(Isolate isolate);
^
../src/i2c.cc: At global scope:
../src/i2c.cc:35:26: error: ‘Arguments’ does not name a type
Handle Scan(const Arguments& args) {
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h: In function ‘v8::Handle Scan(const int&)’:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:908:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/i2c.cc:36:15: error: within this context
HandleScope scope;
^
../src/i2c.cc:39:58: error: invalid types ‘const int[int]’ for array subscript
Local callback = Local::Cast(args[0]);
^
../src/i2c.cc:40:38: error: invalid conversion from ‘int’ to ‘v8::Isolate’ [-fpermissive]
Local results(Array::New(128));
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:3354:23: note: initializing argument 1 of ‘static v8::Local v8::Array::New(v8::Isolate , int)’
static Local New(Isolate isolate, int length = 0);
^
../src/i2c.cc:41:45: error: too few arguments to function ‘v8::Local v8::Null(v8::Isolate )’
Local err = Local::New(Null());
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:328:27: note: declared here
friend Local Null(Isolate isolate);
^
../src/i2c.cc:53:37: error: no matching function for call to ‘v8::Integer::New(int&)’
results->Set(i, Integer::New(res));
^
../src/i2c.cc:53:37: note: candidate is:
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:2770:25: note: static v8::Local v8::Integer::New(v8::Isolate , int32_t)
static Local New(Isolate isolate, int32_t value);
^
/home/pi/.node-gyp/7.7.1/include/node/v8.h:2770:25: note: candidate expects 2 arguments, 1 provided
../src/i2c.cc:60:18: error: ‘GetCurrent’ is not a member of ‘v8::Context’
callback->Call(Context::GetCurrent()->Global(), argc, argv);
^
../src/i2c.cc:62:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(results);
^
../src/i2c.cc: At global scope:
../src/i2c.cc:65:27: error: ‘Arguments’ does not name a type
Handle Close(const Arguments& args) {
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h: In function ‘v8::Handle Close(const int&)’:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:908:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/i2c.cc:66:15: error: within this context
HandleScope scope;
^
../src/i2c.cc:71:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(Undefined());
^
../src/i2c.cc:71:32: error: too few arguments to function ‘v8::Local v8::Undefined(v8::Isolate )’
return scope.Close(Undefined());
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:327:27: note: declared here
friend Local Undefined(Isolate isolate);
^
../src/i2c.cc: At global scope:
../src/i2c.cc:74:26: error: ‘Arguments’ does not name a type
Handle Open(const Arguments& args) {
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h: In function ‘v8::Handle Open(const int&)’:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:908:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/i2c.cc:75:15: error: within this context
HandleScope scope;
^
../src/i2c.cc:77:34: error: invalid types ‘const int[int]’ for array subscript
String::Utf8Value device(args[0]);
^
../src/i2c.cc:79:45: error: too few arguments to function ‘v8::Local v8::Null(v8::Isolate )’
Local err = Local::New(Null());
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:328:27: note: declared here
friend Local Null(Isolate isolate);
^
../src/i2c.cc:83:28: error: ‘New’ is not a member of ‘v8::String’
err = Exception::Error(String::New("Failed to open I2C device"));
^
../src/i2c.cc:86:13: error: invalid types ‘const int[int]’ for array subscript
if (args[1]->IsFunction()) {
^
../src/i2c.cc:88:60: error: invalid types ‘const int[int]’ for array subscript
Local callback = Local::Cast(args[1]);
^
../src/i2c.cc:91:20: error: ‘GetCurrent’ is not a member of ‘v8::Context’
callback->Call(Context::GetCurrent()->Global(), argc, argv);
^
../src/i2c.cc:94:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(Undefined());
^
../src/i2c.cc:94:32: error: too few arguments to function ‘v8::Local v8::Undefined(v8::Isolate )’
return scope.Close(Undefined());
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:327:27: note: declared here
friend Local Undefined(Isolate isolate);
^
../src/i2c.cc: At global scope:
../src/i2c.cc:97:26: error: ‘Arguments’ does not name a type
Handle Read(const Arguments& args) {
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h: In function ‘v8::Handle Read(const int&)’:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:908:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/i2c.cc:98:15: error: within this context
HandleScope scope;
^
../src/i2c.cc:100:19: error: invalid types ‘const int[int]’ for array subscript
int len = args[0]->Int32Value();
^
../src/i2c.cc:102:34: error: no matching function for call to ‘v8::Array::New()’
Local data = Array::New();
^
../src/i2c.cc:102:34: note: candidate is:
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:3354:23: note: static v8::Local v8::Array::New(v8::Isolate , int)
static Local New(Isolate isolate, int length = 0);
^
/home/pi/.node-gyp/7.7.1/include/node/v8.h:3354:23: note: candidate expects 2 arguments, 0 provided
../src/i2c.cc:105:45: error: too few arguments to function ‘v8::Local v8::Null(v8::Isolate )’
Local err = Local::New(Null());
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:328:27: note: declared here
friend Local Null(Isolate isolate);
^
../src/i2c.cc:108:28: error: ‘New’ is not a member of ‘v8::String’
err = Exception::Error(String::New("Cannot read from device"));
^
../src/i2c.cc:111:39: error: no matching function for call to ‘v8::Integer::New(char&)’
data->Set(i, Integer::New(buf[i]));
^
../src/i2c.cc:111:39: note: candidate is:
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:2770:25: note: static v8::Local v8::Integer::New(v8::Isolate , int32_t)
static Local New(Isolate isolate, int32_t value);
^
/home/pi/.node-gyp/7.7.1/include/node/v8.h:2770:25: note: candidate expects 2 arguments, 1 provided
../src/i2c.cc:116:13: error: invalid types ‘const int[int]’ for array subscript
if (args[1]->IsFunction()) {
^
../src/i2c.cc:118:60: error: invalid types ‘const int[int]’ for array subscript
Local callback = Local::Cast(args[1]);
^
../src/i2c.cc:121:20: error: ‘GetCurrent’ is not a member of ‘v8::Context’
callback->Call(Context::GetCurrent()->Global(), argc, argv);
^
../src/i2c.cc:124:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(Undefined());
^
../src/i2c.cc:124:32: error: too few arguments to function ‘v8::Local v8::Undefined(v8::Isolate )’
return scope.Close(Undefined());
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:327:27: note: declared here
friend Local Undefined(Isolate isolate);
^
../src/i2c.cc: At global scope:
../src/i2c.cc:127:30: error: ‘Arguments’ does not name a type
Handle ReadByte(const Arguments& args) {
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h: In function ‘v8::Handle ReadByte(const int&)’:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:908:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/i2c.cc:128:15: error: within this context
HandleScope scope;
^
../src/i2c.cc:131:45: error: too few arguments to function ‘v8::Local v8::Null(v8::Isolate )’
Local err = Local::New(Null());
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:328:27: note: declared here
friend Local Null(Isolate isolate);
^
../src/i2c.cc:136:28: error: ‘New’ is not a member of ‘v8::String’
err = Exception::Error(String::New("Cannot read device"));
^
../src/i2c.cc:138:28: error: no matching function for call to ‘v8::Integer::New(int32_t&)’
data = Integer::New(res);
^
../src/i2c.cc:138:28: note: candidate is:
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:2770:25: note: static v8::Local v8::Integer::New(v8::Isolate , int32_t)
static Local New(Isolate isolate, int32_t value);
^
/home/pi/.node-gyp/7.7.1/include/node/v8.h:2770:25: note: candidate expects 2 arguments, 1 provided
../src/i2c.cc:141:13: error: invalid types ‘const int[int]’ for array subscript
if (args[0]->IsFunction()) {
^
../src/i2c.cc:143:60: error: invalid types ‘const int[int]’ for array subscript
Local callback = Local::Cast(args[0]);
^
../src/i2c.cc:146:20: error: ‘GetCurrent’ is not a member of ‘v8::Context’
callback->Call(Context::GetCurrent()->Global(), argc, argv);
^
../src/i2c.cc:148:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(data);
^
../src/i2c.cc: At global scope:
../src/i2c.cc:151:31: error: ‘Arguments’ does not name a type
Handle ReadBlock(const Arguments& args) {
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h: In function ‘v8::Handle ReadBlock(const int&)’:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:908:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/i2c.cc:152:15: error: within this context
HandleScope scope;
^
../src/i2c.cc:154:22: error: invalid types ‘const int[int]’ for array subscript
int8_t cmd = args[0]->Int32Value();
^
../src/i2c.cc:155:23: error: invalid types ‘const int[int]’ for array subscript
int32_t len = args[1]->Int32Value();
^
../src/i2c.cc:157:45: error: too few arguments to function ‘v8::Local v8::Null(v8::Isolate )’
Local err = Local::New(Null());
^
In file included from /home/pi/.node-gyp/7.7.1/include/node/node.h:42:0,
from ../src/i2c.cc:1:
/home/pi/.node-gyp/7.7.1/include/node/v8.h:328:27: note: declared here
friend Local Null(Isolate isolate);
^
../src/i2c.cc:158:16: error: expected primary-expression before ‘’ token
node::Buffer buffer = node::Buffer::New(len);
^
../src/i2c.cc:158:17: error: ‘buffer’ was not declared in this scope
node::Buffer buffer = node::Buffer::New(len);
^
../src/i2c.cc:158:48: error: no matching function for call to ‘New(int32_t&)’
node::Buffer buffer = node::Buffer::New(len);
^
../src/i2c.cc:158:48: note: candidates are:
In file included from ../src/i2c.cc:2:0:
/home/pi/.node-gyp/7.7.1/include/node/node_buffer.h:31:40: note: v8::MaybeLocal node::Buffer::New(v8::Isolate , size_t)
NODE_EXTERN v8::MaybeLocal New(v8::Isolate isolate, size_t length);
^
/home/pi/.node-gyp/7.7.1/include/node/node_buffer.h:31:40: note: candidate expects 2 arguments, 1 provided
/home/pi/.node-gyp/7.7.1/include/node/node_buffer.h:34:40: note: v8::MaybeLocal node::Buffer::New(v8::Isolate , v8::Local, node::encoding)
NODE_EXTERN v8::MaybeLocal New(v8::Isolate isolate,
^
/home/pi/.node-gyp/7.7.1/include/node/node_buffer.h:34:40: note: candidate expects 3 arguments, 1 provided
/home/pi/.node-gyp/7.7.1/include/node/node_buffer.h:39:40: note: v8::MaybeLocal node::Buffer::New(v8::Isolate , char, size_t, node::Buffer::FreeCallback, void)
NODE_EXTERN v8::MaybeLocal New(v8::Isolate isolate,
^
/home/pi/.node-gyp/7.7.1/include/node/node_buffer.h:39:40: note: candidate expects 5 arguments, 1 provided
/home/pi/.node-gyp/7.7.1/include/node/node_buffer.h:46:40: note: v8::MaybeLocal node::Buffer::New(v8::Isolate , char, size_t)
NODE_EXTERN v8::MaybeLocal New(v8::Isolate isolate,
^
/home/pi/.node-gyp/7.7.1/include/node/node_buffer.h:46:40: note: candidate expects 3 arguments, 1 provided
../src/i2c.cc:160:29: error: ‘GetCurrent’ is not a member of ‘v8::Context’
Local