tspath icon indicating copy to clipboard operation
tspath copied to clipboard

Error: Line 2: Unexpected token

Open JakobJingleheimer opened this issue 6 years ago • 3 comments

The line cited is

import _camelCase from '@lodash/camelCase';

I'm not seeing any invalid syntax there, and there is no other information (besides a stacktrace within tspath).

JakobJingleheimer avatar Jul 05 '18 09:07 JakobJingleheimer

Well, provide your tsconfig.json, your project structure and the actual stacktrace!

duffman avatar Sep 12 '18 20:09 duffman

I've been dealing with the same issue, I've been getting syntax errors every time I wanted to compile into es6. Simply change to "target": "es5" and you should compile without problems.

pawelotto avatar Oct 11 '18 09:10 pawelotto

Oh, so does this project not support ES6 modules then?

osdiab avatar May 24 '19 02:05 osdiab