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

@serialport/bindings dependency seems to cause issues with Node.js 22 #123

Closed
danielpeintner opened this issue Apr 26, 2024 · 5 comments
Closed

Comments

@danielpeintner
Copy link

danielpeintner commented Apr 26, 2024

Describe the bug
In node-wot we tried to add Node.js 22 as CI dependency and the run fails with issues w.r.t. to @serialport/bindings

https://github.com/eclipse-thingweb/node-wot/actions/runs/8846329944/job/24291988667?pr=1274#step:5:13

To Reproduce
See eclipse-thingweb/node-wot#1274.
node-wot uses mbus in package binding-mbus.

Expected behavior npm ci or npm install should work.

Versions:
Tested node-mbus 2.1.0 and 2.2.2.

BTW, I noticed that https://www.npmjs.com/package/@serialport/bindings has been moved to https://www.npmjs.com/package/@serialport/bindings-cpp and has new version
Maybe updating to the latest version of @serialport/bindings-cpp is enough.

@Apollon77
Copy link
Owner

Would this not be an issue in node serialport then for first? then we can updte serialport library here :-)

v12.0 i still the last verison of serialport which was published. I would propose to open an issue there and then we see further. Feel free to link this issue into it.

@danielpeintner
Copy link
Author

danielpeintner commented Apr 27, 2024

Please state me wrong but the node-mbus library does depend (directly or indirectly) on @serialport/bindings (v9.2.9 published 2 years ago) rather than the new @serialport/bindings-cpp (v12.0.1, released 9 month ago).

@Apollon77
Copy link
Owner

Apollon77 commented Apr 27, 2024

hm ... where?

https://github.com/Apollon77/node-mbus/blob/master/package.json#L32-L43

Also in the GitHub committed package-lock.json there is not any string matching "serialport". So where do you find this depnedency in node-mbus?

But in fact your npm tree in your own monorepo (where btw ALL sub-packages matter and not just one) someone is referencing serialport https://github.com/eclipse-thingweb/node-wot/blob/master/package-lock.json#L608 ... and when I look at the versions there it is a very old serialport dep like 9.x, so yes it is referenced.

And when lookimg even deeper ... voilla ... https://github.com/eclipse-thingweb/node-wot/blob/master/package-lock.json#L6855 ... modbus-serial is your friend

I think you might want to upgrade modbus serial to latest patch release because there it brings serialport 12 with it ...

And because npm and mono repos are strange sometimes you could also try with out any change: delete package-lock AND node_modules and do "npm i" on root level, maybe this already solves your issue

@danielpeintner
Copy link
Author

@Apollon77 sorry for the inconvenience I mixed up modbus with mbus 🙈

@Apollon77
Copy link
Owner

lol ... :-) kk

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

2 participants