https://github.com/jhnns/ts-node-tests
https://github.com/jhnns/ts-node-tests
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jhnns/ts-node-tests
- Owner: jhnns
- Created: 2022-01-24T11:32:06.000Z (over 3 years ago)
- Default Branch: without-ext
- Last Pushed: 2022-01-24T11:48:45.000Z (over 3 years ago)
- Last Synced: 2025-01-24T12:13:40.139Z (5 months ago)
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ts-node-tests
This repo demonstrates a problem when using `--loader ts-node/esm`.
## Steps to reproduce
- Run `npm start`
- You'll see:```sh
> [email protected] start
> cross-env NODE_OPTIONS='--loader ts-node/esm' http-server(node:25506) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
/ts-node-tests/node_modules/ts-node/dist-raw/node-esm-default-get-format.js:76
throw new ERR_UNKNOWN_FILE_EXTENSION(ext, fileURLToPath(url));
^
TypeError: ERR_UNKNOWN_FILE_EXTENSION is not a constructor
at defaultGetFormat (/ts-node-tests/node_modules/ts-node/dist-raw/node-esm-default-get-format.js:76:15)
at defer (/ts-node-tests/node_modules/ts-node/src/esm.ts:214:7)
at /ts-node-tests/node_modules/ts-node/src/esm.ts:236:24
at Generator.next ()
at /ts-node-tests/node_modules/ts-node/dist/esm.js:8:71
at new Promise ()
at __awaiter (/ts-node-tests/node_modules/ts-node/dist/esm.js:4:12)
at getFormat (/ts-node-tests/node_modules/ts-node/dist/esm.js:94:16)
at /ts-node-tests/node_modules/ts-node/src/esm.ts:172:14
at Generator.next ()
```