Skip to content

ts-node does not work #174

@bengl

Description

@bengl

Node.js v23.6.0
IITM v1.12.0
ts-node v10.9.2

NODE_OPTIONS="--loader=import-in-the-middle/hook.mjs" npx ts-node -v

You can also try passing a .ts file to ts-node, and you'll get the same result. It just dies with exit code 0.

You will get warnings, but these are expected, I think:

(node:59699) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("import-in-the-middle/hook.mjs", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:59699) ExperimentalWarning: Use `importAttributes` instead of `importAssertions`
(Use `node --trace-warnings ...` to show where the warning was created)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions