Julusian / node-elgato-stream-deck

A Node.js library for interfacing with the Elgato Stream Deck. https://julusian.github.io/node-elgato-stream-deck/
https://www.npmjs.com/org/elgato-stream-deck
MIT License
163 stars 21 forks source link

Bug: device path for openStreamDeck() is actually not optional #98

Closed manueldziuba closed 2 months ago

manueldziuba commented 3 months ago

Related to: @elgato-stream-deck/node Version installed: 6.2.0 Node version: v21.5.0 Machine: macOS 14.5 (on MacBook Air M2) Issue type: bug (in type definition)

As explained in the wiki and shown in the example code, the devicePath parameter in function openStreamDeck can be omitted (the first device will be used then). The API actually shows the correct code (https://www.npmjs.com/package/@elgato-stream-deck/node#api). But version 6.2.0 does not have the parameter set as optional.

When running the Node.js app, it crashes with the following error:

TypeError: Device path must be a string

Thanks for your work! Appreciate it!

Julusian commented 3 months ago

This was an intentional change to the api in 6.0.0, but I appear to have missed on updating the docs.