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

Unexpected token #2

Closed
lollita opened this issue Dec 5, 2020 · 3 comments
Closed

Unexpected token #2

lollita opened this issue Dec 5, 2020 · 3 comments

Comments

@lollita
Copy link

lollita commented Dec 5, 2020

When I try to compile it, I get:

SyntaxError: Unexpected token # in JSON at position 1221
    at JSON.parse (<anonymous>)
    at parseGyp (c:\node-not-the-systray-master\build.js:10:17)
    at main (c:\node-not-the-systray-master\build.js:27:29)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)

I am anyway able to compile binding.sln.

@simonbuchan
Copy link
Owner

That's confusing: parseGyp() has .replace(/\#.+\n/, '') to strip comments out before JSON.parse sees it? What commit are you on?

@simonbuchan
Copy link
Owner

Ugh. Easy fix, String.replace only replaces the first by default, the pattern needs a g flag to replace all. I'll quickly put that in, that should fix it for you.

@lollita
Copy link
Author

lollita commented Dec 5, 2020

Patch fix it.
Compliments for module.
ty.

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

No branches or pull requests

2 participants