You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1563 has it, describes wrong, closed with no fix.
Expected Behavior
When ts-node starts with ES6+ module types, it behaves as usual as pre-ES6 module types, which is having a smooth "undefined" message upon pressing "enter" key the first time with an empty line or having some result if there is an actual command.
Actual Behavior
When ts-node starts with ES6+ module types, the first line results in an error whether full or empty (empty line gives ...<repl>.ts:2)
c:\Workspace\test>npx ts-node
> console.log("hello") <===== first command results in error
c:\Workspace\test\<repl>.ts:3
export {};
^^^^^^
Uncaught SyntaxError: Unexpected token 'export'
> console.log("hello") <===== later commands do not seem to have the problem
hello
undefined
>
Steps to reproduce the problem
create an empty folder, open a terminal and invoke npm install ts-node
create a new tsconfig.json with the following content
Search Terms
REPL
Unexpected token 'export'
#1563 has it, describes wrong, closed with no fix.
Expected Behavior
When ts-node starts with ES6+ module types, it behaves as usual as pre-ES6 module types, which is having a smooth "undefined" message upon pressing "enter" key the first time with an empty line or having some result if there is an actual command.
Actual Behavior
When ts-node starts with ES6+ module types, the first line results in an error whether full or empty (empty line gives
...<repl>.ts:2
)Steps to reproduce the problem
npm install ts-node
tsconfig.json
with the following contentnpx ts-node
Minimal reproduction
above are the minimal steps
Specifications
ts-node v10.9.1
node v18.9.0
compiler v4.8.4
"type":"module"
has no effect)The text was updated successfully, but these errors were encountered: