ts-node icon indicating copy to clipboard operation
ts-node copied to clipboard

SyntaxError: Unexpected token ...

Open isman-usoh opened this issue 10 years ago • 1 comments

Error token "..." but not error compile by tsc

SyntaxError: Unexpected token ... at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.loader (D:\project\node_modules\ts-node\src\ts-node.ts:225:14) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) ....

tsconfig.ts

"compilerOptions": { "target": "es5", "jsx": "react", "module": "commonjs" }

environment typescript: 1.8.2 ts-node: 0.5.5

isman-usoh avatar Feb 23 '16 10:02 isman-usoh

Can you create a project that replicates the behaviour? I can't comment without anything to reproduce, but this is a Node.js parsing error - the emitted JavaScript is not valid (sounds like it's been emitted as ES6).

blakeembrey avatar Feb 23 '16 19:02 blakeembrey