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

npm install error on node v12 #24

Closed
DavidBurela opened this issue Jun 5, 2019 · 3 comments · Fixed by #27
Closed

npm install error on node v12 #24

DavidBurela opened this issue Jun 5, 2019 · 3 comments · Fixed by #27
Assignees
Labels
compatibilty: Node.js 11+ Issues related to the incompatibility with the current Node.js versions

Comments

@DavidBurela
Copy link

I can install correctly on node v10, but v12 throws the below error

npm install @pokusew/pcsclite

> @pokusew/[email protected] install /mnt/c/source/github/nfc-pcsc/node_modules/@pokusew/pcsclite
> node-gyp rebuild

make: Entering directory '/mnt/c/source/github/nfc-pcsc/node_modules/@pokusew/pcsclite/build'
  CXX(target) Release/obj.target/pcsclite/src/addon.o
In file included from ../src/addon.cpp:1:0:
../src/pcsclite.h:31:30: error: ‘v8::Handle’ has not been declared
         static void init(v8::Handle<v8::Object> target);
                              ^~~~~~
../src/pcsclite.h:31:36: error: expected ‘,’ or ‘...’ before ‘<’ token
         static void init(v8::Handle<v8::Object> target);
                                    ^
In file included from ../src/addon.cpp:2:0:
../src/cardreader.h:90:30: error: ‘v8::Handle’ has not been declared
         static void init(v8::Handle<v8::Object> target);
                              ^~~~~~
../src/cardreader.h:90:36: error: expected ‘,’ or ‘...’ before ‘<’ token
         static void init(v8::Handle<v8::Object> target);
                                    ^
../src/cardreader.h:123:20: error: ‘Handle’ in namespace ‘v8’ does not name a template type
         static v8::Handle<v8::Value> CreateBufferInstance(char* data, unsigned long size);
                    ^~~~~~
../src/addon.cpp:4:19: error: variable or field ‘init_all’ declared void
 void init_all(v8::Handle<v8::Object> target) {
                   ^~~~~~
../src/addon.cpp:4:19: error: ‘Handle’ is not a member of ‘v8’
../src/addon.cpp:4:36: error: expected primary-expression before ‘>’ token
 void init_all(v8::Handle<v8::Object> target) {
                                    ^
../src/addon.cpp:4:38: error: ‘target’ was not declared in this scope
 void init_all(v8::Handle<v8::Object> target) {
                                      ^~~~~~
../src/addon.cpp:4:38: note: suggested alternative: ‘tzset’
 void init_all(v8::Handle<v8::Object> target) {
                                      ^~~~~~
                                      tzset
In file included from ../../../nan/nan.h:54:0,
                 from ../src/pcsclite.h:4,
                 from ../src/addon.cpp:1:
../src/addon.cpp:9:23: error: ‘init_all’ was not declared in this scope
 NODE_MODULE(pcsclite, init_all)
                       ^
/home/david/.node-gyp/12.2.0/include/node/node.h:556:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../src/addon.cpp:9:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(pcsclite, init_all)
 ^~~~~~~~~~~
../src/addon.cpp:9:23: note: suggested alternative: ‘initstate’
 NODE_MODULE(pcsclite, init_all)
                       ^
/home/david/.node-gyp/12.2.0/include/node/node.h:556:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../src/addon.cpp:9:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(pcsclite, init_all)
 ^~~~~~~~~~~
pcsclite.target.mk:125: recipe for target 'Release/obj.target/pcsclite/src/addon.o' failed
make: *** [Release/obj.target/pcsclite/src/addon.o] Error 1
make: Leaving directory '/mnt/c/source/github/nfc-pcsc/node_modules/@pokusew/pcsclite/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/david/.nvm/versions/node/v12.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)
gyp ERR! System Linux 4.4.0-18362-Microsoft
gyp ERR! command "/home/david/.nvm/versions/node/v12.2.0/bin/node" "/home/david/.nvm/versions/node/v12.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /mnt/c/source/github/nfc-pcsc/node_modules/@pokusew/pcsclite
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @pokusew/[email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @pokusew/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@jimmythesaint82
Copy link

#23

@pokusew pokusew self-assigned this Jan 24, 2020
@pokusew pokusew added the compatibilty: Node.js 11+ Issues related to the incompatibility with the current Node.js versions label Jan 24, 2020
@pokusew
Copy link
Owner

pokusew commented Jan 25, 2020

@DavidBurela fixes released in version 0.6.0

@DavidBurela
Copy link
Author

I appreciate you taking the time to update the compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibilty: Node.js 11+ Issues related to the incompatibility with the current Node.js versions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants