Skip to content

rclnodeJs installation broken: "Could not locate the bindings file" #820

@nckswt

Description

@nckswt

Description
We've been transitioning an electron app that uses roslibjs over to a ros2 interface. But, currently pulling our hair out trying to get things playing nicely.

Here's an MVP application (https://github.com/nckswt/ros2-electron-app-mvp) to recreate the issue. The main issue we're facing is this error:

Uncaught Error: Could not locate the bindings file. Tried:
  /home/nick/ros2-electron-app-mvp/build/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/build/Debug/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/build/Release/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/out/Debug/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/Debug/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/out/Release/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/Release/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/build/default/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/compiled/14.16.0/linux/x64/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/addon-build/release/install-root/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/addon-build/debug/install-root/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/addon-build/default/install-root/rclnodejs.node
  /home/nick/ros2-electron-app-mvp/lib/binding/node-v87-linux-x64/rclnodejs.node
    at bindings (bindings.js:126)
    at Object../node_modules/rclnodejs/lib/clock.js (clock.js:17)
    at __webpack_require__ (bootstrap:24)
    at fn (hot module replacement:61)
    at Object../node_modules/rclnodejs/index.js (index.js:17)
    at __webpack_require__ (bootstrap:24)
    at fn (hot module replacement:61)
    at Object../src/index.js (index.js:11)
    at __webpack_require__ (bootstrap:24)
    at startup:6

This PR makes me think we should be able to load rclnodejs into the electron renderer.

  • Library Version: 0.20.1
  • ROS Version: galactic
  • Platform / OS: Ubuntu 20.04.3 LTS
  • Node version: v12.22.7

Steps To Reproduce

git clone git@github.com:nckswt/ros2-electron-app-mvp.git
npm i
npm run start:dev

Expected Behavior

I'd expect the node to run without crashing.

Actual Behavior
See error above.

Wondering if there's something I need to do to generate the bindings file? Or if there's an incompatibility with my NodeJS setup somehow? Or if it's even an upstream issue?

Please let me know if there's more info I can provide for debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions