RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
311 stars 70 forks source link

Error in npm install with Ubuntu 22.04 + Humble #888

Open vela-io opened 1 year ago

vela-io commented 1 year ago

Description Hi, everyone. I had this issue when i tried install rclnodejs with npm and source.

I have a simple project to library's test and i cant install successfully.

I had the same result to Ubuntu 20 with foxy.

Steps To Reproduce

  1. source /opt/ros/humble/setup.zsh
  2. mkdir rclnodejs-test
  3. cd rlcnodejs-test
  4. npm init -y
  5. npm install rclnodejs

Expected Behavior Install runs without errors

Actual Behavior

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /home/rodrigo/rclnodejs-test/node_modules/@rclnodejs/ref-napi
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/rodrigo/.npm/_logs/2023-01-05T22_09_58_874Z-debug-0.log
[error.log](https://github.com/RobotWebTools/rclnodejs/files/10355983/error.log)

i've tried update har-validation, uuid and requests but i had same result

samidare210 commented 1 year ago

nodejs version needs to be between 10.23 - 17.x., try to install these version and install the package again

vela-io commented 1 year ago

Thanks for you return, so the documentation is wrong?

The prerequisite is written as: "Nodejs version between 10.23.1 - 19.x." And last feature merged include: "Add support for node v18 & v19 https://github.com/RobotWebTools/rclnodejs/pull/884"

Steps was reproduced correctly and lib should install successfully

wayneparrott commented 1 year ago

@vela-io were you able to make any progress? I setup a similar env as you described in window wls2. I had an issue with the humble setup.zsh so I reverted to using setup.bash which is my default. With that difference I am able to install rclnodejs with no issues. As a quick test could you try using either node 17 or 19. Note - I recently noticed an issue with node 18.3 but did not replicate the issue with node 18.2 or 18.1. I'll investigate that soon.

kavikode commented 3 months ago

please try npm install rclnodejs@0.22.3