bropat / eufy-security-ws

Small server wrapper around eufy-security-client library to access it via a WebSocket.
MIT License
178 stars 28 forks source link

[Bug]: [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" #332

Closed dweeden closed 1 month ago

dweeden commented 4 months ago

Version

1.8.0

Node version

v22.1.0

Operating System type

Linux

Operating system version

Linux Mint 20 Ulyana

Describe the bug

ts-node suggested in tryitout.md does not work

using tsx as suggested here does

To reproduce

  1. clone repo
  2. change into eufy-security-ws
  3. create a config.json file
  4. issues this command: ts-node src/bin/server.ts

Screenshots & Logfiles

node:58101) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated. (Use node --trace-deprecation ... to show where the warning was created) TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /data_8000/eufy/eufy-security-ws/src/bin/server.ts at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:176:9) at defaultGetFormat (node:internal/modules/esm/get_format:219:36) at defaultLoad (node:internal/modules/esm/load:143:22) at async nextLoad (node:internal/modules/esm/hooks:750:22) at async nextLoad (node:internal/modules/esm/hooks:750:22) at async Hooks.load (node:internal/modules/esm/hooks:383:20) at async MessagePort.handleMessage (node:internal/modules/esm/worker:199:18) { code: 'ERR_UNKNOWN_FILE_EXTENSION' }

Additional context

No response

dweeden commented 4 months ago

Maybe suggesting to use tsx src/bin/server.ts in tryitout.md might be the simplest fix?