Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with NodeJS v10.4.0 #90

Open
thorleifjacobsen opened this issue Jun 10, 2018 · 21 comments
Open

Not working with NodeJS v10.4.0 #90

thorleifjacobsen opened this issue Jun 10, 2018 · 21 comments

Comments

@thorleifjacobsen
Copy link


> [email protected] install /home/pi/NodeROV/node_modules/i2c
> node-gyp rebuild

make: Entering directory '/home/pi/NodeROV/node_modules/i2c/build'
  CXX(target) Release/obj.target/i2c/src/i2c.o
In file included from ../../nan/nan.h:190:0,
                 from ../src/i2c.cc:3:
../../nan/nan_maybe_43_inl.h: In function 'Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)':
../../nan/nan_maybe_43_inl.h:88:15: error: 'class v8::Object' has no member named 'ForceSet'
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
               ^~~~~~~~
In file included from ../src/i2c.cc:3:0:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)':
../../nan/nan.h:817:60: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, func, argc, argv);
                                                            ^
In file included from ../src/i2c.cc:1:0:
/home/pi/.node-gyp/10.4.0/include/node/node.h:172:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pi/.node-gyp/10.4.0/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/i2c.cc:3:0:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)':
../../nan/nan.h:831:62: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, symbol, argc, argv);
                                                              ^
In file included from ../src/i2c.cc:1:0:
/home/pi/.node-gyp/10.4.0/include/node/node.h:165:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pi/.node-gyp/10.4.0/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/i2c.cc:3:0:
../../nan/nan.h: In function 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)':
../../nan/nan.h:845:62: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, method, argc, argv);
                                                              ^
In file included from ../src/i2c.cc:1:0:
/home/pi/.node-gyp/10.4.0/include/node/node.h:158:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pi/.node-gyp/10.4.0/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/i2c.cc:3:0:
../../nan/nan.h: In member function 'v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const':
../../nan/nan.h:1463:5: warning: 'v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../src/i2c.cc:1:0:
/home/pi/.node-gyp/10.4.0/include/node/node.h:172:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pi/.node-gyp/10.4.0/include/node/node.h:88:42: note: in definition of macro 'NODE_DEPRECATED'
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
../src/i2c.cc: In function 'void Open(const Nan::FunctionCallbackInfo<v8::Value>&)':
../src/i2c.cc:84:35: warning: 'v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)' is deprecated: Use Isolate version [-Wdeprecated-declarations]
   String::Utf8Value device(info[0]);
                                   ^
In file included from /home/pi/.node-gyp/10.4.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.4.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.4.0/include/node/v8.h:2846:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/home/pi/.node-gyp/10.4.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
i2c.target.mk:93: recipe for target 'Release/obj.target/i2c/src/i2c.o' failed
make: *** [Release/obj.target/i2c/src/i2c.o] Error 1
make: Leaving directory '/home/pi/NodeROV/node_modules/i2c/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.14.34-v7+
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/NodeROV/node_modules/i2c
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/2018-06-10T12_39_35_129Z-debug.log
@rzr
Copy link

rzr commented Aug 8, 2018

As (wrongly) reported elsewhere:
fivdi/i2c-bus#52

I confirm i2c module failed in node:latest (10) docker image while it's ok on node:9.

rzr added a commit to rzr/generic-sensors-lite that referenced this issue Aug 8, 2018
Change-Id: Ica6872c4ff253f8415886ad0885a9af3a7f5e078
Relate-to: kelly/node-i2c#90
Signed-off-by: Philippe Coval <[email protected]>
@rzr
Copy link

rzr commented Aug 21, 2018

Latest known working version is v9.11.2 (v10.0.0 and v10.9.0 failed using nvm)

Is anyone active on this issue ?
or do you know other i2c implementations working for node10 ?

@stheine
Copy link

stheine commented Sep 6, 2018

I have been switching to https://www.npmjs.com/package/rpio . this is working with i2c on node 10.

@matteliot
Copy link

Node 9.11.2 works for me- 10.x hasn't worked at all for it. Latest NPM, etc, npm rebuild i2c, nothing worked.

@rzr
Copy link

rzr commented Nov 9, 2018

Full log of failure using v10.13.0:
https://travis-ci.org/rzr/generic-sensors-lite/jobs/452971481

Is anyone working on this ?

This was referenced Nov 14, 2018
@rzr
Copy link

rzr commented Nov 23, 2018

It looks like this package is more active than i2c:

Is there a way to make "i2c" be cooperatively maintained ? @kelly ?

@matteliot
Copy link

I swapped to i2c-bus it wasn't too big an issue.

@rzr
Copy link

rzr commented Nov 23, 2018

Do you think both could merge to make a smooth transition ?

@matteliot
Copy link

doubt it, it'd be better to select one and do into the future with it, I think

@kelly
Copy link
Owner

kelly commented Nov 23, 2018 via email

@rzr
Copy link

rzr commented Nov 23, 2018

Ok thanks for your feedback @kelly

Well, I am considering to investigate on node-10 support once this issue is fixed:
#91

@rzr
Copy link

rzr commented Dec 20, 2018

Is anyone interested into co maintenance in this team :

https://www.npmjs.com/org/abandonware

adamm added a commit to adamm/ht16k33 that referenced this issue Dec 21, 2018
Due to upstream bug compiling i2c on node v10:
kelly/node-i2c#90
adamm added a commit to adamm/ht16k33 that referenced this issue Dec 21, 2018
Due to upstream bug compiling i2c on node v10:
kelly/node-i2c#90
@rzr
Copy link

rzr commented Jan 16, 2019

Until upstream react,
Feel free to submit PR to:
https://github.com/abandonware/node-i2c

@Silvia-t
Copy link

Also having trouble here on a RPi with Raspbian Stretch 9, NodeJS v10.15.0 and npm 6.4.1..

pi@raspberrypi:~ $ sudo npm install i2c
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

> [email protected] install /home/pi/node_modules/i2c
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.15.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/node_modules/i2c/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/node_modules/i2c/.node-gyp'
gyp ERR! System Linux 4.14.79-v7+
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_modules/i2c
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
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! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional log

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-29T15_54_10_558Z-debug.log

Log:

(0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'i2c' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 7029f1dc5b5105c6
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/i2c 452ms (from cache)
8 silly pacote tag manifest for i2c@latest fetched in 519ms
9 timing stage:loadCurrentTree Completed in 1307ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 2ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 3ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule [email protected] checking installable status
17 http fetch GET 304 https://registry.npmjs.org/bindings 172ms (from cache)
18 silly pacote version manifest for [email protected] fetched in 182ms
19 silly resolveWithNewModule [email protected] checking installable status
20 http fetch GET 304 https://registry.npmjs.org/nan 269ms (from cache)
21 silly pacote range manifest for nan@~2.3.5 fetched in 293ms
22 silly resolveWithNewModule [email protected] checking installable status
23 http fetch GET 304 https://registry.npmjs.org/repl 301ms (from cache)
24 http fetch GET 304 https://registry.npmjs.org/coffee-script 309ms (from cache)
25 silly pacote version manifest for [email protected] fetched in 315ms
26 silly resolveWithNewModule [email protected] checking installable status
27 silly pacote version manifest for [email protected] fetched in 326ms
28 warn deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
29 silly resolveWithNewModule [email protected] checking installable status
30 http fetch GET 304 https://registry.npmjs.org/underscore 336ms (from cache)
31 silly pacote version manifest for [email protected] fetched in 344ms
32 silly resolveWithNewModule [email protected] checking installable status
33 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 406ms
34 timing stage:loadIdealTree Completed in 430ms
35 silly currentTree pi
36 silly idealTree pi
36 silly idealTree ├── [email protected]
36 silly idealTree ├── [email protected]
36 silly idealTree ├── [email protected]
36 silly idealTree ├── [email protected]
36 silly idealTree ├── [email protected]
36 silly idealTree └── [email protected]
37 silly install generateActionsToTake
38 timing stage:generateActionsToTake Completed in 27ms
39 silly diffTrees action count 6
40 silly diffTrees add [email protected]
41 silly diffTrees add [email protected]
42 silly diffTrees add [email protected]
43 silly diffTrees add [email protected]
44 silly diffTrees add [email protected]
45 silly diffTrees add [email protected]
46 silly decomposeActions action count 48
47 silly decomposeActions fetch [email protected]
48 silly decomposeActions extract [email protected]
49 silly decomposeActions preinstall [email protected]
50 silly decomposeActions build [email protected]
51 silly decomposeActions install [email protected]

Thanks :)

@Silvia-t
Copy link

Hi again,

I've sorted out the permissions issue and now I'm getting the same problems as @thorleifjaocbsen:

pi@raspberrypi:~/node_modules $ npm install i2c
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

> [email protected] install /home/pi/node_modules/i2c
> node-gyp rebuild

make: Entering directory '/home/pi/node_modules/i2c/build'
  CXX(target) Release/obj.target/i2c/src/i2c.o
In file included from ../node_modules/nan/nan.h:190:0,
                 from ../src/i2c.cc:3:
../node_modules/nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../node_modules/nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
               ^~~~~~~~
In file included from ../src/i2c.cc:3:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
../node_modules/nan/nan.h:817:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, func, argc, argv);
                                                            ^
In file included from ../src/i2c.cc:1:0:
/home/pi/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pi/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/i2c.cc:3:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’:
../node_modules/nan/nan.h:831:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, symbol, argc, argv);
                                                              ^
In file included from ../src/i2c.cc:1:0:
/home/pi/.node-gyp/10.15.0/include/node/node.h:170:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pi/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/i2c.cc:3:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’:
../node_modules/nan/nan.h:845:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, method, argc, argv);
                                                              ^
In file included from ../src/i2c.cc:1:0:
/home/pi/.node-gyp/10.15.0/include/node/node.h:163:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pi/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
In file included from ../src/i2c.cc:3:0:
../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’:
../node_modules/nan/nan.h:1463:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../src/i2c.cc:1:0:
/home/pi/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pi/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^~~~~~~~~~
../src/i2c.cc: In function ‘void SetAddress(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:38:30: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   addr = info[0]->Int32Value();
                              ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/i2c.cc: In function ‘void Open(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:84:35: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
   String::Utf8Value device(info[0]);
                                   ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2892:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/i2c.cc: In function ‘void Read(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:103:33: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   int len = info[0]->Int32Value();
                                 ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/i2c.cc: In function ‘void ReadBlock(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:154:36: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   int8_t cmd = info[0]->Int32Value();
                                    ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/i2c.cc:155:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   int32_t len = info[1]->Int32Value();
                                     ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/i2c.cc:178:43: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       int32_t delay = info[2]->Int32Value();
                                           ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/i2c.cc: In function ‘void Write(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:193:53: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   int   len = node::Buffer::Length(buffer->ToObject());
                                                     ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/i2c.cc:194:52: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   char* data = node::Buffer::Data(buffer->ToObject());
                                                    ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/i2c.cc: In function ‘void WriteByte(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:213:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   int8_t byte = info[0]->Int32Value();
                                     ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/i2c.cc: In function ‘void WriteBlock(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:232:36: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   int8_t cmd = info[0]->Int32Value();
                                    ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/i2c.cc:233:53: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   int   len = node::Buffer::Length(buffer->ToObject());
                                                     ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/i2c.cc:234:52: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   char* data = node::Buffer::Data(buffer->ToObject());
                                                    ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/node.h:63:0,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
 Local<Object> Value::ToObject() const {
               ^~~~~
../src/i2c.cc: In function ‘void WriteWord(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:253:36: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   int8_t cmd = info[0]->Int32Value();
                                    ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/i2c.cc:254:38: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   int16_t word = info[1]->Int32Value();
                                      ^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
                 from ../src/i2c.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
i2c.target.mk:99: recipe for target 'Release/obj.target/i2c/src/i2c.o' failed
make: *** [Release/obj.target/i2c/src/i2c.o] Error 1
make: Leaving directory '/home/pi/node_modules/i2c/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:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.79-v7+
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_modules/i2c
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
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! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/2019-01-30T09_16_27_268Z-debug.log

Thanks.

szakharchenko added a commit to digitalloggers/node-BNO055 that referenced this issue Feb 6, 2019
@rzr
Copy link

rzr commented Feb 25, 2019

As anyone fixed this in a fork ?

rzr added a commit to rzr/color-sensor-js that referenced this issue Feb 25, 2019
Relate-to:kelly/node-i2c#90
Change-Id: I2f46eb06c8a4daac29b58c706a3e559103867097
Signed-off-by: Philippe Coval <[email protected]>
rzr added a commit to rzr/color-sensor-js that referenced this issue Feb 25, 2019
Relate-to:kelly/node-i2c#90
Change-Id: I2f46eb06c8a4daac29b58c706a3e559103867097
Signed-off-by: Philippe Coval <[email protected]>
rzr added a commit to SamsungInternet/color-sensor-js that referenced this issue Feb 26, 2019
Simulator does not requiere i2c

Relate-to: kelly/node-i2c#90
Change-Id: Idf5854cbce9fcafd611f8725473465ee0aab507a
Signed-off-by: Philippe Coval <[email protected]>
rzr added a commit to TizenTeam/node-i2c that referenced this issue Jul 3, 2019
Updating nan for node-10

Bug: kelly#90
Forwarded: https://github.com/kelly/node-i2c/pulls
Change-Id: Ic46ed8072015b9f64ee3567965ea603c76bb3006
Signed-off-by: Philippe Coval <[email protected]>
rzr added a commit to abandonware/node-i2c that referenced this issue Jul 15, 2019
Updating nan for node-10

Bug: kelly#90
Forwarded: https://github.com/kelly/node-i2c/pulls
Change-Id: Ic46ed8072015b9f64ee3567965ea603c76bb3006
Signed-off-by: Philippe Coval <[email protected]>
@jscaglia
Copy link

Hello, I tried to install this library but does not working in Node 10.15.2
I need this library because is ones of PN532 dependencies.
The error that I have is ...
Do you know if exist any solution??

make: se entra en el directorio '/home/pi/noderest/cedula/node_modules/i2c/build'
CXX(target) Release/obj.target/i2c/src/i2c.o
In file included from ../node_modules/nan/nan.h:190,
from ../src/i2c.cc:3:
../node_modules/nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’:
../node_modules/nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
^~~~~~~~
In file included from ../src/i2c.cc:3:
../node_modules/nan/nan.h: In function ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’:
../node_modules/nan/nan.h:817:60: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, func, argc, argv);
^
In file included from ../src/i2c.cc:1:
/usr/include/nodejs/src/node.h:177:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
/usr/include/nodejs/src/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/i2c.cc:3:
../node_modules/nan/nan.h:817:60: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, func, argc, argv);
^
In file included from ../src/i2c.cc:1:
/usr/include/nodejs/src/node.h:177:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
/usr/include/nodejs/src/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/i2c.cc:3:
../node_modules/nan/nan.h: In function ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value
)’:
../node_modules/nan/nan.h:831:62: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate*, v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, symbol, argc, argv);
^
In file included from ../src/i2c.cc:1:
/usr/include/nodejs/src/node.h:170:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
/usr/include/nodejs/src/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/i2c.cc:3:
../node_modules/nan/nan.h:831:62: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, symbol, argc, argv);
^
In file included from ../src/i2c.cc:1:
/usr/include/nodejs/src/node.h:170:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
/usr/include/nodejs/src/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/i2c.cc:3:
../node_modules/nan/nan.h: In function ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char
, int, v8::Localv8::Value)’:
../node_modules/nan/nan.h:845:62: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, const char*, int, v8::Localv8::Value)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, method, argc, argv);
^
In file included from ../src/i2c.cc:1:
/usr/include/nodejs/src/node.h:163:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
/usr/include/nodejs/src/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/i2c.cc:3:
../node_modules/nan/nan.h:845:62: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, const char*, int, v8::Localv8::Value)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, method, argc, argv);
^
In file included from ../src/i2c.cc:1:
/usr/include/nodejs/src/node.h:163:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
/usr/include/nodejs/src/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/i2c.cc:3:
../node_modules/nan/nan.h: In member function ‘v8::Localv8::Value Nan::Callback::Call_(v8::Isolate
, v8::Localv8::Object, int, v8::Localv8::Value) const’:
../node_modules/nan/nan.h:1463:5: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
));
^
In file included from ../src/i2c.cc:1:
/usr/include/nodejs/src/node.h:177:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
/usr/include/nodejs/src/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/i2c.cc:3:
../node_modules/nan/nan.h:1463:5: warning: ‘v8::Localv8::Value node::MakeCallback(v8::Isolate
, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
));
^
In file included from ../src/i2c.cc:1:
/usr/include/nodejs/src/node.h:177:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
/usr/include/nodejs/src/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/i2c.cc:3:
../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker
)’:
../node_modules/nan/nan.h:1706: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/i2c.cc: In function ‘void SetAddress(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:38:30: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
addr = info[0]->Int32Value();
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/i2c.cc: In function ‘void Open(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:84:35: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Localv8::Value)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
String::Utf8Value device(info[0]);
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2892:28: note: declared here
explicit Utf8Value(Localv8::Value obj));
^~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/i2c.cc: In function ‘void Read(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:103:33: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int len = info[0]->Int32Value();
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/i2c.cc: In function ‘void ReadBlock(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:154:36: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int8_t cmd = info[0]->Int32Value();
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/i2c.cc:155:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int32_t len = info[1]->Int32Value();
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/i2c.cc:178:43: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int32_t delay = info[2]->Int32Value();
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/i2c.cc: In function ‘void Write(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:193:53: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int len = node::Buffer::Length(buffer->ToObject());
^
In file included from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
../src/i2c.cc:194:52: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
char* data = node::Buffer::Data(buffer->ToObject());
^
In file included from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
../src/i2c.cc: In function ‘void WriteByte(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:213:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int8_t byte = info[0]->Int32Value();
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/i2c.cc: In function ‘void WriteBlock(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:232:36: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int8_t cmd = info[0]->Int32Value();
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/i2c.cc:233:53: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int len = node::Buffer::Length(buffer->ToObject());
^
In file included from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
../src/i2c.cc:234:52: warning: ‘v8::Localv8::Object v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
char* data = node::Buffer::Data(buffer->ToObject());
^
In file included from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
../src/i2c.cc: In function ‘void WriteWord(const Nan::FunctionCallbackInfov8::Value&)’:
../src/i2c.cc:253:36: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int8_t cmd = info[0]->Int32Value();
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/i2c.cc:254:38: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
int16_t word = info[1]->Int32Value();
^
In file included from /usr/include/nodejs/deps/v8/include/v8.h:26,
from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:2478:46: note: declared here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
In file included from ../src/i2c.cc:1:
../src/i2c.cc: At global scope:
/usr/include/nodejs/src/node.h:570:43: warning: cast between incompatible function types from ‘void ()(v8::Handlev8::Object)’ {aka ‘void ()(v8::Localv8::Object)’} to ‘node::addon_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc),
^
/usr/include/nodejs/src/node.h:604:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/i2c.cc:295:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(i2c, Init)
^~~~~~~~~~~
In file included from /usr/include/nodejs/src/node.h:63,
from ../src/i2c.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfonode::ObjectWrap&)]’:
/usr/include/nodejs/src/node_object_wrap.h:85:78: required from here
/usr/include/nodejs/deps/v8/include/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfonode::ObjectWrap::Callback’ {aka ‘void (
)(const v8::WeakCallbackInfonode::ObjectWrap&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
reinterpret_cast(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P
, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)]’:
../node_modules/nan/nan_object_wrap.h:66:61: required from here
/usr/include/nodejs/deps/v8/include/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfoNan::ObjectWrap::Callback’ {aka ‘void (
)(const v8::WeakCallbackInfoNan::ObjectWrap&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
make: *** [i2c.target.mk:101: Release/obj.target/i2c/src/i2c.o] Error 1
make: se sale del directorio '/home/pi/noderest/cedula/node_modules/i2c/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/noderest/cedula/node_modules/i2c
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/2019-09-24T22_41_16_622Z-debug.log

@rzr
Copy link

rzr commented Sep 25, 2019

As fallback try:

 npm install abandonware/i2c

@jscaglia
Copy link

As fallback try:

 npm install abandonware/i2c

Is it possible that the repository is private?

npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/abandonware/i2c.git
npm ERR!
npm ERR! Warning: Permanently added the RSA host key for IP address '140.82.113.4' to the list of known hosts.
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: No se pudo leer del repositorio remoto.
npm ERR!
npm ERR! Por favor asegúrese que tiene los permisos de acceso correctos
npm ERR! y que el repositorio existe.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-09-25T12_46_29_019Z-debug.log

@matteliot
Copy link

matteliot commented Sep 25, 2019 via email

@jscaglia
Copy link

fwiw, I swapped to i2c-bus with minimal code changes and it's fine, I'm using up to 12.4 or something: https://www.npmjs.com/package/i2c-bus

On Wed, Sep 25, 2019 at 9:04 AM jscaglia @.> wrote: As fallback try: npm install abandonware/i2c Is it possible that the repository is private? npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t ssh:// @./abandonware/i2c.git npm ERR! npm ERR! Warning: Permanently added the RSA host key for IP address '140.82.113.4' to the list of known hosts. npm ERR! @.***: Permission denied (publickey). npm ERR! fatal: No se pudo leer del repositorio remoto. npm ERR! npm ERR! Por favor asegúrese que tiene los permisos de acceso correctos npm ERR! y que el repositorio existe. npm ERR! npm ERR! exited with error code: 128 npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2019-09-25T12_46_29_019Z-debug.log — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#90?email_source=notifications&email_token=AABKR73Y4KC674WA32WN54DQLNOUNA5CNFSM4FEGZSS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7R2FJQ#issuecomment-535012006>, or mute the thread https://github.com/notifications/unsubscribe-auth/AABKR762XDMU7MZCFH7N2B3QLNOUNANCNFSM4FEGZSSQ .

Hello, I tried to use this library but the problem is that is not compatible with npm PN532.
I have a raspberry pi 3 with an NFC board and I need to save data on an NFC card.
The PN532 library I see that it can do it without reaching such a low level.

Do you know if there is any way to do it with another library in case you can't with it?

http://wiki.sunfounder.cc/index.php?title=PN532_NFC_Module_for_Raspberry_Pi
https://www.npmjs.com/package/pn532

rzr added a commit to TizenTeam/node-i2c that referenced this issue Jan 13, 2020
Change-Id: I58160ef591b53c8e29fcd1d0da41fc1d1b5deaf3
Relate-to: kelly#90
Forwarded: https://github.com/kelly/node-i2c/pulls
Origin: https://github.com/tizenteam/node-i2c
Signed-off-by: Philippe Coval <[email protected]>
rzr added a commit to TizenTeam/node-i2c that referenced this issue Jan 13, 2020
Change-Id: I58160ef591b53c8e29fcd1d0da41fc1d1b5deaf3
Relate-to: kelly#90
Forwarded: https://github.com/kelly/node-i2c/pulls
Origin: https://github.com/tizenteam/node-i2c
Signed-off-by: Philippe Coval <[email protected]>
Repository owner deleted a comment from rzr Jan 13, 2020
rzr added a commit to abandonware/bh1750 that referenced this issue Jan 13, 2020
Change-Id: I09b302a0f30016a65b16433b7ad12138dfd0ac75
Relate-to: kelly/node-i2c#90
Signed-off-by: Philippe Coval <[email protected]>
rzr added a commit to CrossStream/bh1750 that referenced this issue Feb 24, 2020
Change-Id: I09b302a0f30016a65b16433b7ad12138dfd0ac75
Relate-to: kelly/node-i2c#90
Origin: https://github.com/abandonware/bh1750
Relate-to: miroRucka#25
Forwarded: https://github.com/miroRucka/bh1750/pulls
Signed-off-by: Philippe Coval <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants