GithubHelp home page GithubHelp logo

Unable to npm install about rc522-rfid HOT 9 OPEN

sbrinkmann avatar sbrinkmann commented on June 20, 2024
Unable to npm install

from rc522-rfid.

Comments (9)

magic890 avatar magic890 commented on June 20, 2024 1

No, I haven't solved it yet, but I took a different approach. Here you can find my repository (rfid-reader-http) to play with RFID. I'm using pcsclite module and it's works fine.

If you want to use this repository, you can have a look on the more recent and updated forks. Maybe they had solved this issue.

from rc522-rfid.

sbeattie avatar sbeattie commented on June 20, 2024

I get the same issue when trying to install using:

node -v v0.12.6
node-gyp -v v2.0.1

Would love to understand how I can get this working.

from rc522-rfid.

patrickse avatar patrickse commented on June 20, 2024

Tried it with node v4.2.2 and it fails to build

from rc522-rfid.

aismen69 avatar aismen69 commented on June 20, 2024

same issue using:
Rpi2
node -v v0.12.6
node-gyp -v v0.12.2

from rc522-rfid.

pdreslin avatar pdreslin commented on June 20, 2024

Did anyone find a resolution to this? I'm trying to use the rc522-rfid and get the following:

pi@raspberrypi2:~/RFID/node_modules/rc522-rfid$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/RFID/node_modules/rc522-rfid/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/.node-gyp/5.6.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/pi/.node-gyp/5.6.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/pi/RFID/node_modules/rc522-rfid',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/pi/RFID/node_modules/rc522-rfid/build'
CC(target) Release/obj.target/rc522/src/rc522.o
CC(target) Release/obj.target/rc522/src/rfid.o
CXX(target) Release/obj.target/rc522/src/accessor.o
../src/accessor.cc:24:33: error: âArgumentsâ does not name a type
Handle RunCallback(const Arguments& args) {
^
In file included from /home/pi/.node-gyp/5.6.0/include/node/node.h:42:0,
from ../src/accessor.cc:1:
/home/pi/.node-gyp/5.6.0/include/node/v8.h: In function âv8::Handlev8::Value RunCallback(const int&)â:
/home/pi/.node-gyp/5.6.0/include/node/v8.h:889:13: error: âv8::HandleScope::HandleScope()â is protected
V8_INLINE HandleScope() {}
^
../src/accessor.cc:25:15: error: within this context
HandleScope scope;
^
../src/accessor.cc:27:58: error: invalid types âconst int[int]â for array subscript
Local callback = Local::Cast(args[0]);
^
../src/accessor.cc:70:50: error: âNewâ is not a member of âv8::Stringâ
Local argv[argc] = { Local::New(String::New(&rfidChipSerialNumber[1])) };
^
../src/accessor.cc:71:19: error: âGetCurrentâ is not a member of âv8::Contextâ
callback->Call(Context::GetCurrent()->Global(), argc, argv);
^
../src/accessor.cc:84:15: error: âclass v8::HandleScopeâ has no member named âCloseâ
return scope.Close(Undefined());
^
../src/accessor.cc:84:31: error: too few arguments to function âv8::Localv8::Primitive v8::Undefined(v8::Isolate_)â
return scope.Close(Undefined());
^
In file included from /home/pi/.node-gyp/5.6.0/include/node/node.h:42:0,
from ../src/accessor.cc:1:
/home/pi/.node-gyp/5.6.0/include/node/v8.h:315:27: note: declared here
friend Local Undefined(Isolate_ isolate);
^
../src/accessor.cc: In function âvoid Init(v8::Handlev8::Object, v8::Handlev8::Object)â:
../src/accessor.cc:89:15: error: âNewSymbolâ is not a member of âv8::Stringâ
module->Set(String::NewSymbol("exports"), FunctionTemplate::New(RunCallback)->GetFunction());
^
../src/accessor.cc:89:78: error: no matching function for call to âv8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))â
module->Set(String::NewSymbol("exports"), FunctionTemplate::New(RunCallback)->GetFunction());
^
../src/accessor.cc:89:78: note: candidate is:
In file included from /home/pi/.node-gyp/5.6.0/include/node/node.h:42:0,
from ../src/accessor.cc:1:
/home/pi/.node-gyp/5.6.0/include/node/v8.h:4348:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Localv8::Value, v8::Localv8::Signature, int)
static Local New(
^
/home/pi/.node-gyp/5.6.0/include/node/v8.h:4348:34: note: no known conversion for argument 1 from âv8::Handlev8::Value(const int&) {aka v8::Localv8::Value(const int&)}â to âv8::Isolate_â
rc522.target.mk:88: recipe for target 'Release/obj.target/rc522/src/accessor.o' failed
make: *** [Release/obj.target/rc522/src/accessor.o] Error 1
make: Leaving directory '/home/pi/RFID/node_modules/rc522-rfid/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/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.13-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/RFID/node_modules/rc522-rfid
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok

from rc522-rfid.

mdoroshenko avatar mdoroshenko commented on June 20, 2024

Cannot install after following the pre-requisite steps...

pi@raspberrypi:~ $ npm install --save rc522-rfid
npm WARN engine [email protected]: wanted: {"node":">=0.8.0 <0.13.0"} (current: {"node":"4.6.0","npm":"2.15.9"})

[email protected] preinstall /home/pi/node_modules/rc522-rfid
(node-gyp configure) || (exit 0)

[email protected] install /home/pi/node_modules/rc522-rfid
(node-gyp rebuild) || (exit 0)

make: Entering directory '/home/pi/node_modules/rc522-rfid/build'
CC(target) Release/obj.target/rc522/src/rc522.o
CC(target) Release/obj.target/rc522/src/rfid.o
CXX(target) Release/obj.target/rc522/src/accessor.o
../src/accessor.cc:24:33: error: ‘Arguments’ does not name a type
Handle RunCallback(const Arguments& args) {
^
In file included from /home/pi/.node-gyp/4.6.0/include/node/node.h:42:0,
from ../src/accessor.cc:1:
/home/pi/.node-gyp/4.6.0/include/node/v8.h: In function ‘v8::Handlev8::Value RunCallback(const int&)’:
/home/pi/.node-gyp/4.6.0/include/node/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/accessor.cc:25:15: error: within this context
HandleScope scope;
^
../src/accessor.cc:27:58: error: invalid types ‘const int[int]’ for array subscript
Local callback = Local::Cast(args[0]);
^
../src/accessor.cc:70:50: error: ‘New’ is not a member of ‘v8::String’
Local argv[argc] = { Local::New(String::New(&rfidChipSerialNumber[1])) };
^
../src/accessor.cc:71:19: error: ‘GetCurrent’ is not a member of ‘v8::Context’
callback->Call(Context::GetCurrent()->Global(), argc, argv);
^
../src/accessor.cc:84:15: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(Undefined());
^
../src/accessor.cc:84:31: error: too few arguments to function ‘v8::Localv8::Primitive v8::Undefined(v8::Isolate_)’
return scope.Close(Undefined());
^
In file included from /home/pi/.node-gyp/4.6.0/include/node/node.h:42:0,
from ../src/accessor.cc:1:
/home/pi/.node-gyp/4.6.0/include/node/v8.h:315:27: note: declared here
friend Local Undefined(Isolate_ isolate);
^
../src/accessor.cc: In function ‘void Init(v8::Handlev8::Object, v8::Handlev8::Object)’:
../src/accessor.cc:89:15: error: ‘NewSymbol’ is not a member of ‘v8::String’
module->Set(String::NewSymbol("exports"), FunctionTemplate::New(RunCallback)->GetFunction());
^
../src/accessor.cc:89:78: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’
module->Set(String::NewSymbol("exports"), FunctionTemplate::New(RunCallback)->GetFunction());
^
../src/accessor.cc:89:78: note: candidate is:
In file included from /home/pi/.node-gyp/4.6.0/include/node/node.h:42:0,
from ../src/accessor.cc:1:
/home/pi/.node-gyp/4.6.0/include/node/v8.h:4349:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Localv8::Value, v8::Localv8::Signature, int)
static Local New(
^
/home/pi/.node-gyp/4.6.0/include/node/v8.h:4349:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&) {aka v8::Localv8::Value(const int&)}’ to ‘v8::Isolate_’
rc522.target.mk:94: recipe for target 'Release/obj.target/rc522/src/accessor.o' failed
make: *** [Release/obj.target/rc522/src/accessor.o] Error 1
make: Leaving directory '/home/pi/node_modules/rc522-rfid/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:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.23-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/node_modules/rc522-rfid
gyp ERR! node -v v4.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
[email protected] node_modules/rc522-rfid

from rc522-rfid.

jburd0 avatar jburd0 commented on June 20, 2024

I'm just checking to see if anyone has found a solution?

from rc522-rfid.

LaloHao avatar LaloHao commented on June 20, 2024

Any update?

npm install --save rc522-rfid

> [email protected] preinstall /home/otserv/sesamo/node_modules/.staging/rc522-rfid-713f50e7
> (node-gyp configure) || (exit 0)


> [email protected] install /home/otserv/sesamo/node_modules/rc522-rfid
> (node-gyp rebuild) || (exit 0)

make: Entering directory '/home/otserv/sesamo/node_modules/rc522-rfid/build'
  CC(target) Release/obj.target/rc522/src/rc522.o
  CC(target) Release/obj.target/rc522/src/rfid.o
  CXX(target) Release/obj.target/rc522/src/accessor.o
../src/accessor.cc:24:33: error: 'Arguments' does not name a type
 Handle<Value> RunCallback(const Arguments& args) {
                                 ^~~~~~~~~
../src/accessor.cc: In function 'v8::Handle<v8::Value> RunCallback(const int&)':
../src/accessor.cc:25:15: error: 'v8::HandleScope::HandleScope()' is protected within this context
   HandleScope scope;
               ^~~~~
In file included from /home/otserv/.node-gyp/7.2.0/include/node/node.h:42:0,
                 from ../src/accessor.cc:1:
/home/otserv/.node-gyp/7.2.0/include/node/v8.h:882:13: note: declared protected here
   V8_INLINE HandleScope() {}
             ^~~~~~~~~~~
../src/accessor.cc:27:58: error: invalid types 'const int[int]' for array subscript
   Local<Function> callback = Local<Function>::Cast(args[0]);
                                                          ^
../src/accessor.cc:70:50: error: 'New' is not a member of 'v8::String'
    Local<Value> argv[argc] = { Local<Value>::New(String::New(&rfidChipSerialNumber[1])) };
                                                  ^~~~~~
../src/accessor.cc:71:19: error: 'GetCurrent' is not a member of 'v8::Context'
    callback->Call(Context::GetCurrent()->Global(), argc, argv);
                   ^~~~~~~
../src/accessor.cc:84:15: error: 'class v8::HandleScope' has no member named 'Close'
  return scope.Close(Undefined());
               ^~~~~
../src/accessor.cc:84:31: error: too few arguments to function 'v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)'
  return scope.Close(Undefined());
                               ^
In file included from /home/otserv/.node-gyp/7.2.0/include/node/node.h:42:0,
                 from ../src/accessor.cc:1:
/home/otserv/.node-gyp/7.2.0/include/node/v8.h:325:27: note: declared here
   friend Local<Primitive> Undefined(Isolate* isolate);
                           ^~~~~~~~~
../src/accessor.cc: In function 'void Init(v8::Handle<v8::Object>, v8::Handle<v8::Object>)':
../src/accessor.cc:89:15: error: 'NewSymbol' is not a member of 'v8::String'
   module->Set(String::NewSymbol("exports"), FunctionTemplate::New(RunCallback)->GetFunction());
               ^~~~~~
../src/accessor.cc:89:78: error: no matching function for call to 'v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))'
   module->Set(String::NewSymbol("exports"), FunctionTemplate::New(RunCallback)->GetFunction());
                                                                              ^
In file included from /home/otserv/.node-gyp/7.2.0/include/node/node.h:42:0,
                 from ../src/accessor.cc:1:
/home/otserv/.node-gyp/7.2.0/include/node/v8.h:4510:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
   static Local<FunctionTemplate> New(
                                  ^~~
/home/otserv/.node-gyp/7.2.0/include/node/v8.h:4510:34: note:   no known conversion for argument 1 from 'v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}' to 'v8::Isolate*'
make: *** [rc522.target.mk:92: Release/obj.target/rc522/src/accessor.o] Error 1
make: Leaving directory '/home/otserv/sesamo/node_modules/rc522-rfid/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:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.35-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/otserv/sesamo/node_modules/rc522-rfid
gyp ERR! node -v v7.2.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
[email protected] /home/otserv/sesamo
`-- [email protected]

npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression

from rc522-rfid.

mvtcode avatar mvtcode commented on June 20, 2024

I install error too

npm install --save rc522-rfid

[email protected] preinstall /home/pi/test-rfid/node_modules/rc522-rfid
(node-gyp configure) || (exit 0)

[email protected] install /home/pi/test-rfid/node_modules/rc522-rfid
(node-gyp rebuild) || (exit 0)

make: Entering directory '/home/pi/test-rfid/node_modules/rc522-rfid/build'
CC(target) Release/obj.target/rc522/src/rc522.o
CC(target) Release/obj.target/rc522/src/rfid.o
CXX(target) Release/obj.target/rc522/src/accessor.o
../src/accessor.cc:24:33: error: ‘Arguments’ does not name a type
Handle RunCallback(const Arguments& args) {
^~~~~~~~~
../src/accessor.cc: In function ‘v8::Handlev8::Value RunCallback(const int&)’:
../src/accessor.cc:25:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
HandleScope scope;
^~~~~
In file included from /home/pi/.cache/node-gyp/10.15.2/include/node/node.h:63,
from ../src/accessor.cc:1:
/home/pi/.cache/node-gyp/10.15.2/include/node/v8.h:883:13: note: declared protected here
V8_INLINE HandleScope() {}
^~~~~~~~~~~
../src/accessor.cc:27:58: error: invalid types ‘const int[int]’ for array subscript
Local callback = Local::Cast(args[0]);
^
../src/accessor.cc:70:58: error: ‘New’ is not a member of ‘v8::String’
Local argv[argc] = { Local::New(String::New(&rfidChipSerialNumber[1])) };
^~~
../src/accessor.cc:71:28: error: ‘GetCurrent’ is not a member of ‘v8::Context’
callback->Call(Context::GetCurrent()->Global(), argc, argv);
^~~~~~~~~~
../src/accessor.cc:84:15: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(Undefined());
^~~~~
../src/accessor.cc:84:31: error: too few arguments to function ‘v8::Localv8::Primitive v8::Undefined(v8::Isolate*)’
return scope.Close(Undefined());
^
In file included from /home/pi/.cache/node-gyp/10.15.2/include/node/node.h:63,
from ../src/accessor.cc:1:
/home/pi/.cache/node-gyp/10.15.2/include/node/v8.h:321:27: note: declared here
friend Local Undefined(Isolate* isolate);
^~~~~~~~~
../src/accessor.cc: In function ‘void Init(v8::Handlev8::Object, v8::Handlev8::Object)’:
../src/accessor.cc:89:23: error: ‘NewSymbol’ is not a member of ‘v8::String’
module->Set(String::NewSymbol("exports"), FunctionTemplate::New(RunCallback)->GetFunction());
^~~~~~~~~
../src/accessor.cc:89:78: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’
module->Set(String::NewSymbol("exports"), FunctionTemplate::New(RunCallback)->GetFunction());
^
In file included from /home/pi/.cache/node-gyp/10.15.2/include/node/node.h:63,
from ../src/accessor.cc:1:
/home/pi/.cache/node-gyp/10.15.2/include/node/v8.h:5644:34: note: candidate: ‘static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Localv8::Value, v8::Localv8::Signature, int, v8::ConstructorBehavior, v8::SideEffectType)’
static Local New(
^~~
/home/pi/.cache/node-gyp/10.15.2/include/node/v8.h:5644:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&)’ {aka ‘v8::Localv8::Value(const int&)’} to ‘v8::Isolate*’
In file included from ../src/accessor.cc:1:
../src/accessor.cc: At global scope:
/home/pi/.cache/node-gyp/10.15.2/include/node/node.h:570:43: warning: cast between incompatible function types from ‘void ()(v8::Handlev8::Object, v8::Handlev8::Object)’ {aka ‘void ()(v8::Localv8::Object, 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),
^
/home/pi/.cache/node-gyp/10.15.2/include/node/node.h:604:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/accessor.cc:109:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(rc522, Init)
^~~~~~~~~~~
make: *** [rc522.target.mk:101: Release/obj.target/rc522/src/accessor.o] Error 1
make: Leaving directory '/home/pi/test-rfid/node_modules/rc522-rfid/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:196: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.58-v7+
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/test-rfid/node_modules/rc522-rfid
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

  • [email protected]
    updated 1 package and audited 1 package in 17.468s
    found 0 vulnerabilities

from rc522-rfid.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.