question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported syntax "catch { }"

See original GitHub issue

npm build , use _jsdom@16.0.0@jsdom , build error

 } catch {
          ^
SyntaxError: Unexpected token {
    at createScript 

https://github.com/jsdom/jsdom/commit/d2ae947c60297a8ec404b4adbd78267bedd439f4?diff=split

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
JLHwungcommented, Feb 12, 2020

jsdom@16 requires node >= 10, if you have the same issue, please update node to version 10. Closing this issue as it is not relevant to babel.

0reactions
nicolo-ribaudocommented, Feb 13, 2020

@carlosesh If you have a repository that reproduces the problem I would be happy to look at it.

Is it possible that you have two different node versions installed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling, "try...catch" - The Modern JavaScript Tutorial
The “try…catch” syntax · First, the code in try {...} is executed. · If there were no errors, then catch (err) is ignored:...
Read more >
Catch Syntax error in JavaScript for ES6 not supported browsers
I have code like this: window.onerror = function(message) { message += '. Your browser may not support ES6.'; ...
Read more >
8. Errors and Exceptions — Python 3.11.1 documentation
Syntax errors, also known as parsing errors, are perhaps the most common kind of complaint you get while you are still learning Python:....
Read more >
Control flow and error handling - JavaScript - MDN Web Docs
The try...catch statement marks a block of statements to try, and specifies one or more responses should an exception be thrown.
Read more >
4 Errors and Exception Handling
This section describes how to trap predefined TimesTen errors or ... uses Oracle Database syntax or built-in procedures that are not supported by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found