TypeStrong / ts-node

TypeScript execution and REPL for node.js
https://typestrong.org/ts-node
MIT License
12.86k stars 536 forks source link

console.log('hi'); fails in REPL with "module": "esnext" #2084

Closed sparecycles closed 8 months ago

sparecycles commented 11 months ago

Search Terms

repl, semicolon

Expected Behavior

Works in NodeJS native REPL

Actual Behavior

weird error message is printed.

<repl>.ts:3
export {};
^^^^^^

Uncaught SyntaxError: Unexpected token 'export'

Steps to reproduce the problem

Specifications

gfx commented 10 months ago

duplicate