Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The tsconfig.json is parsed as JSON instead of JSON5 #46

Open
lazarljubenovic opened this issue Nov 11, 2019 · 1 comment
Open

The tsconfig.json is parsed as JSON instead of JSON5 #46

lazarljubenovic opened this issue Nov 11, 2019 · 1 comment

Comments

@lazarljubenovic
Copy link

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.

@piotrwitek
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants