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

Compile error with gyp Err! #245

Open
zhaoyi0113 opened this issue Aug 31, 2023 · 1 comment
Open

Compile error with gyp Err! #245

zhaoyi0113 opened this issue Aug 31, 2023 · 1 comment

Comments

@zhaoyi0113
Copy link

I am running yarn install --lock-file with node v16.15.1 and yarn 1.22.19 but got below error:

warning Error running install script for optional dependency: "/Users/joey/dev/compound-protocol/node_modules/node-hid: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: /Users/joey/dev/compound-protocol/node_modules/node-hid
Output:
prebuild-install WARN install No prebuilt binaries found (target=16.15.1 runtime=node arch=arm64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp info find Python using Python version 3.11.4 found at \"/opt/homebrew/opt/[email protected]/bin/python3.11\"
gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.11
gyp info spawn args [
gyp info spawn args   '/Users/joey/.nvm/versions/node/v16.15.1/lib/node_modules/npm/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   '/Users/joey/dev/compound-protocol/node_modules/node-hid/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/joey/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/joey/Library/Caches/node-gyp/16.15.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/joey/Library/Caches/node-gyp/16.15.1',
gyp info spawn args   '-Dnode_gyp_dir=/Users/joey/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/joey/Library/Caches/node-gyp/16.15.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/joey/dev/compound-protocol/node_modules/node-hid',
gyp info spawn args   '-Dnode_engine=v8',
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 args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/hidapi/hidapi/mac/hid.o
  LIBTOOL-STATIC Release/hidapi.a
  CXX(target) Release/obj.target/HID/src/HID.o
In file included from ../src/HID.cc:35:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                          ^
/Users/joey/Library/Caches/node-gyp/16.15.1/include/node/v8.h:5614:3: note: 'GetContents' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use GetBackingStore. See http://crbug.com/v8/9908.\")
  ^
/Users/joey/Library/Caches/node-gyp/16.15.1/include/node/v8config.h:454:35: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message) [[deprecated(message)]]
                                  ^
../src/HID.cc:612:31: error: too few arguments to function call, expected 3, have 2
  node::AtExit(deinitialize, 0);
  ~~~~~~~~~~~~                ^
/Users/joey/Library/Caches/node-gyp/16.15.1/include/node/node.h:939:18: note: 'AtExit' declared here
NODE_EXTERN void AtExit(Environment* env,
                 ^
1 warning and 1 error generated.
make: *** [Release/obj.target/HID/src/HID.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/joey/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 22.2.0
gyp ERR! command \"/Users/joey/.nvm/versions/node/v16.15.1/bin/node\" \"/Users/joey/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /Users/joey/dev/compound-protocol/node_modules/node-hid
✨  Done in 30.01s.
@jerome011107
Copy link

How did you solve it?

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

2 participants