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

Unable to build project locally #1318

Closed
garrettparris opened this issue Nov 4, 2022 · 5 comments · Fixed by #1338
Closed

Unable to build project locally #1318

garrettparris opened this issue Nov 4, 2022 · 5 comments · Fixed by #1338

Comments

@garrettparris
Copy link

Hello, I was wanting to contribute to this project. However, I am unable to build this project. I have followed all steps in Hacking.md and tried doing my own research but have gotten nowhere. Here is what I am getting:

git lfs step:

hackatom.wasm: OK
ibc_reflect.wasm: OK

yarn install step:

yarn install
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @cosmjs/amino@workspace:packages/amino doesn't provide jasmine-core (p3b488), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/cosmwasm-stargate@workspace:packages/cosmwasm-stargate doesn't provide jasmine-core (p4bb4d), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/crypto@workspace:packages/crypto doesn't provide jasmine-core (p39c2c), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/encoding@workspace:packages/encoding doesn't provide jasmine-core (p56d68), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/faucet-client@workspace:packages/faucet-client doesn't provide jasmine-core (p1ee44), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/json-rpc@workspace:packages/json-rpc doesn't provide jasmine-core (pe3fca), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/math@workspace:packages/math doesn't provide jasmine-core (p00bbe), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/proto-signing@workspace:packages/proto-signing doesn't provide jasmine-core (p8d482), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/socket@workspace:packages/socket doesn't provide jasmine-core (paca33), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/stargate@workspace:packages/stargate doesn't provide jasmine-core (p3bbdc), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/stream@workspace:packages/stream doesn't provide jasmine-core (pc3b6f), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/tendermint-rpc@workspace:packages/tendermint-rpc doesn't provide jasmine-core (pf034a), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/utils@workspace:packages/utils doesn't provide jasmine-core (pd0a2f), requested by karma-jasmine-html-reporter
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ protobufjs@npm:6.11.3 must be built because it never has been before or the last one failed
➤ YN0007: │ node-hid@npm:2.1.1 must be built because it never has been before or the last one failed
➤ YN0007: │ usb@npm:1.7.1 must be built because it never has been before or the last one failed
➤ YN0009: │ protobufjs@npm:6.11.3 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/bt/648wjlvd52s7810qjqs8zf600000gn/T/xfs-e0b0e5c9/build.log)
➤ YN0009: │ node-hid@npm:2.1.1 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/bt/648wjlvd52s7810qjqs8zf600000gn/T/xfs-16fc607b/build.log)
➤ YN0009: │ usb@npm:1.7.1 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/bt/648wjlvd52s7810qjqs8zf600000gn/T/xfs-0d8ae5f8/build.log)
➤ YN0000: └ Completed in 0s 656ms
➤ YN0000: Failed with errors in 0s 924ms

and further, if I enter the logs I get this from the protobufjs error:

# This file contains the result of Yarn building a package (protobufjs@npm:6.11.3)
# Script name: postinstall

node:internal/errors:484
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_LOADER_CHAIN_INCOMPLETE]: "file:///Users/garrettparris/Documents/cosmjs/.pnp.loader.mjs 'resolve'" did not call the next$
    at new NodeError (node:internal/errors:393:5)
    at ESMLoader.resolve (node:internal/modules/esm/loader:849:13)
    at async ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:7)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async loadESM (node:internal/process/esm_loader:91:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12) {
  code: 'ERR_LOADER_CHAIN_INCOMPLETE'
}

Node.js v18.11.0

love the project, cant wait to contribute.

@webmaster128
Copy link
Member

Hey @garrettparris! Thanks for reaching out. I was having issues with Node.js 18 as well before (#1240). I did not look into it in detail. I think you can work around it by using Node.js 14 or 16.

@cosmos cosmos deleted a comment Nov 23, 2022
@webmaster128
Copy link
Member

Ah, this might be this bug yarnpkg/berry#4778 which started with node.js 16.17. Will upgrade yarn to fix it.

@apollo-sturdy
Copy link

@webmaster128 I'm getting the same or a similar issue on MacOS Ventura 13.3 (Apple Silicon) running yarn 3.8.0 and node v20.9.0.

yarn install output:

➤ YN0000: ┌ Resolution step
➤ YN0002: │ @cosmjs/amino@workspace:packages/amino doesn't provide jasmine-core (p3b488), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/cosmwasm-stargate@workspace:packages/cosmwasm-stargate doesn't provide jasmine-core (p4bb4d), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/crypto@workspace:packages/crypto doesn't provide jasmine-core (p39c2c), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/encoding@workspace:packages/encoding doesn't provide jasmine-core (p56d68), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/faucet-client@workspace:packages/faucet-client doesn't provide jasmine-core (p1ee44), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/json-rpc@workspace:packages/json-rpc doesn't provide jasmine-core (pe3fca), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/math@workspace:packages/math doesn't provide jasmine-core (p00bbe), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/proto-signing@workspace:packages/proto-signing doesn't provide jasmine-core (p8d482), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/socket@workspace:packages/socket doesn't provide jasmine-core (paca33), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/stargate@workspace:packages/stargate doesn't provide jasmine-core (p3bbdc), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/stream@workspace:packages/stream doesn't provide jasmine-core (pc3b6f), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/tendermint-rpc@workspace:packages/tendermint-rpc doesn't provide jasmine-core (pf034a), requested by karma-jasmine-html-reporter
➤ YN0002: │ @cosmjs/utils@workspace:packages/utils doesn't provide jasmine-core (pd0a2f), requested by karma-jasmine-html-reporter
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ usb@npm:1.9.2 must be built because it never has been before or the last one failed
➤ YN0009: │ usb@npm:1.9.2 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/v6/k2lclw6n65929tythngrq5qw0000gn/T/xfs-e711461c/build.log)
➤ YN0000: └ Completed in 3s 308ms
➤ YN0000: Failed with errors in 3s 547ms

Build log mentioned above:

# This file contains the result of Yarn building a package (usb@npm:1.9.2)
# Script name: install

(node:31005) [MODULE_NOT_FOUND] Error: node-gyp-build tried to access node-gyp, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
(Use `node --trace-warnings ...` to show where the warning was created)
gyp info it worked if it ends with ok
gyp info using node-gyp@9.4.0
gyp info using node@20.9.0 | darwin | arm64
gyp info find Python using Python version 3.11.5 found at "/Users/sturdy/.pyenv/versions/3.11.5/bin/python3"
(node:31007) [MODULE_NOT_FOUND] Error: debug tried to access supports-color (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
(Use `node --trace-warnings ...` to show where the warning was created)
gyp info spawn /Users/sturdy/.pyenv/versions/3.11.5/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/sturdy/Programming/cosmos/cosmjs/.yarn/unplugged/node-gyp-npm-9.4.0-ebf5f5573e/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/sturdy/Programming/cosmos/cosmjs/.yarn/unplugged/usb-npm-1.9.2-7362a49b80/node_modules/usb/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sturdy/Programming/cosmos/cosmjs/.yarn/unplugged/node-gyp-npm-9.4.0-ebf5f5573e/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sturdy/Library/Caches/node-gyp/20.9.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=/Users/sturdy/Library/Caches/node-gyp/20.9.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/sturdy/Programming/cosmos/cosmjs/.yarn/unplugged/node-gyp-npm-9.4.0-ebf5f5573e/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/sturdy/Library/Caches/node-gyp/20.9.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/sturdy/Programming/cosmos/cosmjs/.yarn/unplugged/usb-npm-1.9.2-7362a49b80/node_modules/usb',
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 ]
ERROR:root:code for hash blake2b was not found.
Traceback (most recent call last):
  File "/Users/sturdy/.pyenv/versions/3.11.5/lib/python3.11/hashlib.py", line 307, in <module>
    globals()[__func_name] = __get_hash(__func_name)
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sturdy/.pyenv/versions/3.11.5/lib/python3.11/hashlib.py", line 129, in __get_openssl_constructor
    return __get_builtin_constructor(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sturdy/.pyenv/versions/3.11.5/lib/python3.11/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type blake2b
ERROR:root:code for hash blake2s was not found.
Traceback (most recent call last):
  File "/Users/sturdy/.pyenv/versions/3.11.5/lib/python3.11/hashlib.py", line 307, in <module>
    globals()[__func_name] = __get_hash(__func_name)
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sturdy/.pyenv/versions/3.11.5/lib/python3.11/hashlib.py", line 129, in __get_openssl_constructor
    return __get_builtin_constructor(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sturdy/.pyenv/versions/3.11.5/lib/python3.11/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type blake2s
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
../libusb/libusb/io.c:2300:30: warning: comparison of integers of different signs: 'int' and 'nfds_t' (aka 'unsigned int') [-Wsign-compare]
                for (i = internal_nfds ; i < nfds ; ++i) {
                                         ~ ^ ~~~~
1 warning generated.
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/darwin_usb.o
../libusb/libusb/os/darwin_usb.c:55:29: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
_Atomic int32_t initCount = ATOMIC_VAR_INIT(0);
                            ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include/stdatomic.h:51:41: note: macro marked 'deprecated' here
#pragma clang deprecated(ATOMIC_VAR_INIT)
                                        ^
1 warning generated.
  LIBTOOL-STATIC Release/usb.a
  CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from ../src/node_usb.cc:1:
In file included from ../src/node_usb.h:14:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node_buffer.h:25:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node.h:73:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8.h:24:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-array-buffer.h:12:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-local-handle.h:12:
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
SHARED_EXTERNAL_POINTER_TAGS(CHECK_SHARED_EXTERNAL_POINTER_TAGS)
                             ^
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:465:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
PER_ISOLATE_EXTERNAL_POINTER_TAGS(CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS)
                                  ^
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:466:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:693:61: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
    static_assert(kJSObjectType + 1 == kFirstJSApiObjectType);
                                                            ^
                                                            , ""
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:694:55: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
    static_assert(kJSObjectType < kLastJSApiObjectType);
                                                      ^
                                                      , ""
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-internal.h:695:63: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
    static_assert(kFirstJSApiObjectType < kLastJSApiObjectType);
                                                              ^
                                                              , ""
In file included from ../src/node_usb.cc:1:
In file included from ../src/node_usb.h:14:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node_buffer.h:25:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node.h:73:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8.h:24:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-array-buffer.h:13:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:9:
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-maybe.h:106:45: error: no template named 'is_lvalue_reference_v' in namespace 'std'; did you mean 'is_lvalue_reference'?
  template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
                                       ~~~~~^~~~~~~~~~~~~~~~~~~~~
                                            is_lvalue_reference
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_reference.h:26:29: note: 'is_lvalue_reference' declared here
struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { };
                            ^
In file included from ../src/node_usb.cc:1:
In file included from ../src/node_usb.h:14:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node_buffer.h:25:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node.h:73:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8.h:24:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-array-buffer.h:13:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:9:
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-maybe.h:106:69: error: expected '(' for function-style cast or type construction
  template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-maybe.h:123:43: error: no template named 'is_lvalue_reference_v' in namespace 'std'; did you mean 'is_lvalue_reference'?
template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
                                     ~~~~~^~~~~~~~~~~~~~~~~~~~~
                                          is_lvalue_reference
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_reference.h:26:29: note: 'is_lvalue_reference' declared here
struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { };
                            ^
In file included from ../src/node_usb.cc:1:
In file included from ../src/node_usb.h:14:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node_buffer.h:25:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node.h:73:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8.h:24:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-array-buffer.h:13:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-object.h:9:
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-maybe.h:123:67: error: expected '(' for function-style cast or type construction
template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from ../src/node_usb.cc:1:
In file included from ../src/node_usb.h:14:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node_buffer.h:25:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/node.h:73:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8.h:33:
In file included from /Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-function.h:11:
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-function-callback.h:151:66: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
                kReturnValueDefaultValueIndex - kReturnValueIndex);
                                                                 ^
                                                                 , ""
/Users/sturdy/Library/Caches/node-gyp/20.9.0/include/node/v8-function-callback.h:153:50: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions]
                kIsolateIndex - kReturnValueIndex);
                                                 ^
                                                 , ""
../src/node_usb.cc:118:2: warning: 'libusb_set_debug' is deprecated [-Wdeprecated-declarations]
        libusb_set_debug(usb_context, info[0].As<Napi::Number>().Int32Value());
        ^
../libusb/libusb/libusb.h:1324:1: note: 'libusb_set_debug' has been explicitly marked deprecated here
LIBUSB_DEPRECATED_FOR(libusb_set_option)
^
../libusb/libusb/libusb.h:89:49: note: expanded from macro 'LIBUSB_DEPRECATED_FOR'
#define LIBUSB_DEPRECATED_FOR(f) __attribute__((deprecated))
                                                ^
23 warnings and 4 errors generated.
make: *** [Release/obj.target/usb_bindings/src/node_usb.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/sturdy/Programming/cosmos/cosmjs/.yarn/unplugged/node-gyp-npm-9.4.0-ebf5f5573e/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Darwin 22.4.0
gyp ERR! command "/Users/sturdy/Library/Application Support/fnm/node-versions/v20.9.0/installation/bin/node" "/Users/sturdy/Programming/cosmos/cosmjs/.yarn/unplugged/node-gyp-npm-9.4.0-ebf5f5573e/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/sturdy/Programming/cosmos/cosmjs/.yarn/unplugged/usb-npm-1.9.2-7362a49b80/node_modules/usb
gyp ERR! node -v v20.9.0
gyp ERR! node-gyp -v v9.4.0
gyp ERR! not ok 

Spent a good hour trying various fixes found by googling errors above but no luck. Any ideas?

@twhy
Copy link
Contributor

twhy commented Mar 1, 2024

@apollo-sturdy I had a same issue. And I switch to Node 18 using nvm and it works now

@apollo-sturdy
Copy link

@apollo-sturdy I had a same issue. And I switch to Node 18 using nvm and it works now

Thanks a lot! It worked :)

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

Successfully merging a pull request may close this issue.

4 participants