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 able to install with npm #100

Open
kard8 opened this issue Sep 22, 2023 · 0 comments
Open

Not able to install with npm #100

kard8 opened this issue Sep 22, 2023 · 0 comments

Comments

@kard8
Copy link

kard8 commented Sep 22, 2023

The installation is failing after the npm command. Please help, I am new to the development scene.

Run on MacBook Air M2 with terminal in rosetta mode.
The latest xcode is installed.

Here is the npm output:

npm WARN deprecated node-pre-gyp@0.17.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path /Users/(USER)/node_modules/gymnasticon/node_modules/usb
npm ERR! command failed
npm ERR! command sh -c prebuild-install --verbose || node-gyp rebuild
npm ERR! CC(target) Release/obj.target/libusb/libusb/libusb/core.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/io.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/os/darwin_usb.o
npm ERR!   LIBTOOL-STATIC Release/usb.a
npm ERR!   CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
npm ERR! prebuild-install info begin Prebuild-install version 5.3.6
npm ERR! prebuild-install info install installing standalone, skipping download.
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@18.18.0 | darwin | x64
npm ERR! gyp info find Python using Python version 3.11.5 found at "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.11/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/(USER)/node_modules/gymnasticon/node_modules/usb/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/(USER)/Library/Caches/node-gyp/18.18.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/(USER)/Library/Caches/node-gyp/18.18.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/(USER)/Library/Caches/node-gyp/18.18.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/(USER)/node_modules/gymnasticon/node_modules/usb',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../libusb/libusb/core.c:2241:35: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
npm ERR!         if (header_len < 0 || header_len >= sizeof(buf)) {
npm ERR!                               ~~~~~~~~~~ ^  ~~~~~~~~~~~
npm ERR! ../libusb/libusb/core.c:2250:44: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
npm ERR!         if (text_len < 0 || text_len + header_len >= sizeof(buf)) {
npm ERR!                             ~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
npm ERR! 2 warnings generated.
npm ERR! ../libusb/libusb/os/darwin_usb.c:344:3: warning: 'objc_registerThreadWithCollector' is deprecated: it does nothing. Define OBJC_SILENCE_GC_DEPRECATIONS=1 to temporarily silence this diagnostic. [-Wdeprecated-declarations]
npm ERR!   objc_registerThreadWithCollector();
npm ERR!   ^
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/objc/objc-auto.h:248:1: note: 'objc_registerThreadWithCollector' has been explicitly marked deprecated here
npm ERR! OBJC_GC_DEPRECATED("it does nothing")
npm ERR! ^
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/objc/objc-auto.h:50:55: note: expanded from macro 'OBJC_GC_DEPRECATED'
npm ERR! #   define OBJC_GC_DEPRECATED(message) __attribute__((deprecated(message ". Define OBJC_SILENCE_GC_DEPRECATIONS=1 to temporarily silence this diagnostic.")))
npm ERR!                                                       ^
npm ERR! ../libusb/libusb/os/darwin_usb.c:441:7: warning: 'OSAtomicIncrement32Barrier' is deprecated: first deprecated in macOS 10.12 - Use atomic_fetch_add() from <stdatomic.h> instead [-Wdeprecated-declarations]
npm ERR!   if (OSAtomicIncrement32Barrier(&initCount) == 1) {
npm ERR!       ^
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:183:9: note: 'OSAtomicIncrement32Barrier' has been explicitly marked deprecated here
npm ERR! int32_t OSAtomicIncrement32Barrier( volatile int32_t *__theValue );
npm ERR!         ^
npm ERR! ../libusb/libusb/os/darwin_usb.c:461:7: warning: 'OSAtomicDecrement32Barrier' is deprecated: first deprecated in macOS 10.12 - Use atomic_fetch_sub() from <stdatomic.h> instead [-Wdeprecated-declarations]
npm ERR!   if (OSAtomicDecrement32Barrier(&initCount) == 0) {
npm ERR!       ^
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/OSAtomicDeprecated.h:202:9: note: 'OSAtomicDecrement32Barrier' has been explicitly marked deprecated here
npm ERR! int32_t OSAtomicDecrement32Barrier( volatile int32_t *__theValue );
npm ERR!         ^
npm ERR! ../libusb/libusb/os/darwin_usb.c:1281:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'IOUSBInterfaceInterface550 **' (aka 'struct IOUSBInterfaceStruct550 **') [-Wnon-literal-null-conversion]
npm ERR!   cInterface->interface = IO_OBJECT_NULL;
npm ERR!                           ^~~~~~~~~~~~~~
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOTypes.h:172:25: note: expanded from macro 'IO_OBJECT_NULL'
npm ERR! #define IO_OBJECT_NULL  ((io_object_t) 0)
npm ERR!                         ^~~~~~~~~~~~~~~~~
npm ERR! 4 warnings generated.
npm ERR! In file included from ../src/node_usb.cc:1:
npm ERR! In file included from ../src/node_usb.h:21:
npm ERR! In file included from ../src/helpers.h:3:
npm ERR! ../node_modules/nan/nan.h:2470:8: warning: 'SetAccessor' is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
npm ERR!   tpl->SetAccessor(
npm ERR!        ^
npm ERR! /Users/(USER)/Library/Caches/node-gyp/18.18.0/include/node/v8-template.h:837:3: note: 'SetAccessor' has been explicitly marked deprecated here
npm ERR!   V8_DEPRECATED("Do signature check in accessor")
npm ERR!   ^
npm ERR! /Users/(USER)/Library/Caches/node-gyp/18.18.0/include/node/v8config.h:460:35: note: expanded from macro 'V8_DEPRECATED'
npm ERR! # define V8_DEPRECATED(message) [[deprecated(message)]]
npm ERR!                                   ^
npm ERR! In file included from ../src/node_usb.cc:1:
npm ERR! In file included from ../src/node_usb.h:21:
npm ERR! In file included from ../src/helpers.h:3:
npm ERR! In file included from ../node_modules/nan/nan.h:2818:
npm ERR! ../node_modules/nan/nan_typedarray_contents.h:34:43: error: no member named 'GetContents' in 'v8::ArrayBuffer'
npm ERR!       data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
npm ERR!                                   ~~~~~~~~^
npm ERR! ../src/node_usb.cc:151:7: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
npm ERR!         Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
npm ERR!              ^
npm ERR! ../node_modules/nan/nan.h:1001:3: note: 'MakeCallback' has been explicitly marked deprecated here
npm ERR!   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
npm ERR!   ^
npm ERR! ../node_modules/nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
npm ERR! # define NAN_DEPRECATED __attribute__((deprecated))
npm ERR!                                        ^
npm ERR! 2 warnings and 1 error generated.
npm ERR! make: *** [Release/obj.target/usb_bindings/src/node_usb.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
npm ERR! gyp ERR! System Darwin 22.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/(USER)/node_modules/gymnasticon/node_modules/usb
npm ERR! gyp ERR! node -v v18.18.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok

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

1 participant