When you run tsc --init, you get a default setup for the tsconfig.json file, which is not actually a JSON file. It's a super-set of JSON which allows, amongst other things, trailing commas and comments in the JSON file. However, it seems like this module doesn't recognize this grammar, and thus fails to parse the default minimal setup with TypeScript:
SyntaxError: /home/.../tsconfig.json: Unexpected token / in JSON at position 29
After changing my tsconfig.json to be without comments (manually), the module works properly.
Hey @lazarljubenovic
It's using ts-node dependency to load tsconfig.json.
There was a new major version for ts-node so I would check if it's supporting JSON5 and open a PR.
When you run
tsc --init
, you get a default setup for thetsconfig.json
file, which is not actually a JSON file. It's a super-set of JSON which allows, amongst other things, trailing commas and comments in the JSON file. However, it seems like this module doesn't recognize this grammar, and thus fails to parse the default minimal setup with TypeScript:After changing my
tsconfig.json
to be without comments (manually), the module works properly.