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

Issue: SyntaxError: Unexpected token 'class' (line 58, file "Code", project "SheetConverter" #18

Open
tomatokevin opened this issue May 11, 2020 · 1 comment

Comments

@tomatokevin
Copy link

Description of issue

cannot run and is showing error message SyntaxError: Unexpected token 'class' (line 58, file "Code", project "SheetConverter"

Cell Format exhibiting problem

Expected result vs Observed result

cannot run and is showing error message

Installed Library Version

6

@mwarden
Copy link

mwarden commented May 28, 2020

I can confirm this. Interestingly, I don't have to even try to use the library for the error to result; all that is required is that it's added to the project as a resource. If I remove it, the error doesn't happen. Add it back in, it happens, even if I'm not utilizing the library anywhere in my code.

Another interesting bit. I have other scripts using the exact same version of the library, created a number of months ago. I just ran those and there is no issue. It's only the script where I am newly adding the SheetConverter library where I'm getting this error.

It's the exact same error reported here: SyntaxError: Unexpected token 'class' (line 58, file "Code", project "SheetConverter"

I have a strong suspicion this is related to the new runtime. In the older project, where your library works fine, I get prompted by "Enable new Apps Script runtime powered by Chrome V8 for this project". I bet that if I clicked "Enable", I would start getting your error.

I tested this on the new google sheet by going to Run -> Disable new Apps Script runtime powered by Chrome v8. Then I reran code both not using your library and using your library. No error.

To @tomatokevin, I recommend doing the above as a workaround for now

Long term, the code needs to be adjusted to support the new runtime (or both runtimes)

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