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
160 stars 21 forks source link

`tslib` seems to still be required as dependency #9

Closed foxxyz closed 3 years ago

foxxyz commented 3 years ago

Even though 3ebd04f seems to have removed the tslib dependency, installing the latest release from npm still complains about it being needed:

node:internal/modules/cjs/loader:928
  throw err;
  ^

Error: Cannot find module 'tslib'
Require stack:
- /some/path/node_modules/elgato-stream-deck/dist/models/index.js
- /some/path/node_modules/elgato-stream-deck/dist/index.js
- /some/path/index.js

Looking into it, this seems to be caused by export * in models/index.ts.

Replacing this line with export { KeyIndex, DeviceModelId, StreamDeckDeviceInfo } from './id' would fix this. However, I am no TypeScript expert and there may be a more elegant TS-specific alternative I'm not aware of.

Happy to submit a PR, let me know your preference.

Julusian commented 3 years ago

I guess this will be because I completely replaced the tsconfig, so the fix you linked needs to be reapplied.

I'll write a fix and do a new release tomorrow

ahmadnassri commented 3 years ago

FYI: it looks like 4.0.1 is not on npm's registry.

Julusian commented 3 years ago

I needed to do a little digging before publishing it, as the tests were failing. That looks to be a problem in a different project, so this is now published to npm

ahmadnassri commented 3 years ago

thank you :+1:

foxxyz commented 3 years ago

Nice! Thanks @Julusian!