Coder Social home page Coder Social logo

Comments (6)

Julusian avatar Julusian commented on August 19, 2024

For the yarn yarn install error, Do a sudo apt-get install yasm cmake then retry yarn install. You need to build that dependnecy manually as I havent published an appropriate arm build

Try doing a yarn dist --armv7l for the second error

from companion-satellite.

alatteri avatar alatteri commented on August 19, 2024
apt-get install yasm cmake
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  cmake-data libarchive13 libjsoncpp1 librhash0
Suggested packages:
  cmake-doc ninja-build lrzip
The following NEW packages will be installed:
  cmake cmake-data libarchive13 libjsoncpp1 librhash0 yasm
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,422 kB of archives.
After this operation, 22.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

yarn install
yarn install v1.22.5
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > @sofie-automation/[email protected]" has incorrect peer dependency "typescript@~4.0".
[5/5] Building fresh packages...
[1/8] ⠄ @julusian/jpeg-turbo
[7/8] ⠄ electron
[3/8] ⠄ sharp
[4/8] ⠄ usb-detection
error /root/companion-remote/node_modules/usb-detection: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments: 
Directory: /root/companion-remote/node_modules/usb-detection
Output:
prebuild-install WARN install No prebuilt binaries found (target=12.21.0 runtime=node arch=arm libc= platform=linux)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info find Python using Python version 3.8.5 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/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   '/root/companion-remote/node_modules/usb-detection/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/12.21.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=/root/.cache/node-gyp/12.21.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/12.21.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/root/companion-remote/node_modules/usb-detection',
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' ]
make: Entering directory '/root/companion-remote/node_modules/usb-detection/build'
  CXX(target) Release/obj.target/detection/src/detection.o
../src/detection.cpp: In function ‘void Find(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/detection.cpp:166:68: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  166 |  uv_queue_work(uv_default_loop(), req, EIO_Find, (uv_after_work_cb)EIO_AfterFind);
      |                                                                    ^~~~~~~~~~~~~
In file included from ../src/detection.h:5,
                 from ../src/detection.cpp:1:
../src/detection.cpp: At global scope:
/root/.cache/node-gyp/12.21.0/include/node/node.h:737:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  737 |       (node::addon_register_func) (regfunc),                          \
      |                                           ^
/root/.cache/node-gyp/12.21.0/include/node/node.h:771:3: note: in expansion of macro ‘NODE_MODULE_X’
  771 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/detection.cpp:226:1: note: in expansion of macro ‘NODE_MODULE’
  226 | NODE_MODULE(detection, init);
      | ^~~~~~~~~~~
  CXX(target) Release/obj.target/detection/src/deviceList.o
  CXX(target) Release/obj.target/detection/src/detection_linux.o
../src/detection_linux.cpp:1:10: fatal error: libudev.h: No such file or directory
    1 | #include <libudev.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [detection.target.mk:111: Release/obj.target/detection/src/detection_linux.o] Error 1
make: Leaving directory '/root/companion-remote/node_modules/usb-detection/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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.10.16-sunxi
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/companion-remote/node_modules/usb-detection

from companion-satellite.

alatteri avatar alatteri commented on August 19, 2024

installing libudev-dev libusb-1.0-0-dev libgusb-dev seems to fix the above error.

from companion-satellite.

alatteri avatar alatteri commented on August 19, 2024
 node main.js 192.168.113.223
/root/companion-remote/node_modules/bindings/bindings.js:121
        throw e;
        ^

Error: The module '/root/companion-remote/node_modules/usb-detection/build/Release/detection.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 82. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at bindings (/root/companion-remote/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/root/companion-remote/node_modules/usb-detection/index.js:13:37)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)

from companion-satellite.

Julusian avatar Julusian commented on August 19, 2024

oh, if you arent running with electron then you don't want to do the yarn dist you should have done just a yarn build. Dist does some extra work to rebuild the modules for electron which breaks it for node

do rm -Rf node_modules, yarn install and yarn build

from companion-satellite.

alatteri avatar alatteri commented on August 19, 2024

Yeah, just trying to make a headless companion remote using Armbian on a RS1 https://www.friendlyarm.com/index.php?route=product/product&path=69&product_id=248

from companion-satellite.

Related Issues (20)

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.