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

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

Open
dweeden opened this issue May 22, 2024 · 1 comment
Open

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

dweeden opened this issue May 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dweeden
Copy link

dweeden commented May 22, 2024

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 dweeden added the bug Something isn't working label May 22, 2024
@dweeden
Copy link
Author

dweeden commented May 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant