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.

Error while parsing TypeScript React (tsx)

See original GitHub issue

Just wanted to report this because I ran across it this morning. I noticed I wasn’t getting syntax highlighting for a certain TSX file and found this error in my console:

refined-bitbucket(code-review):  TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.
    at u (chrome-extension://afppminkfnfngihdocacbgeajbbdklkf/main.js:1)
    at HTMLElement.<anonymous> (chrome-extension://afppminkfnfngihdocacbgeajbbdklkf/main.js:1)
    at chrome-extension://afppminkfnfngihdocacbgeajbbdklkf/main.js:1
    at Array.forEach (<anonymous>)
    at p (chrome-extension://afppminkfnfngihdocacbgeajbbdklkf/main.js:1)
    at chrome-extension://afppminkfnfngihdocacbgeajbbdklkf/main.js:1
    at Array.forEach (<anonymous>)
    at new a (chrome-extension://afppminkfnfngihdocacbgeajbbdklkf/main.js:1)
    at HTMLDivElement.Element.observeSelector (chrome-extension://afppminkfnfngihdocacbgeajbbdklkf/main.js:1)
    at t.then.t (chrome-extension://afppminkfnfngihdocacbgeajbbdklkf/main.js:1)

I cleared my cache and refreshed multiple times with no change. This isn’t happening with all TSX files, so I’ll look into exactly what is causing this when I have some time.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
yuritoledocommented, Jun 3, 2020

The highlight still does not work in TSX files 😕

0reactions
reyronaldcommented, Jun 30, 2018

Closing this to decrease a little bit of the clutter on the open issues page and because I haven’t been able to reproduce this myself. Feel free to re-open or comment if anyone has something else to add to the discussion!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React typescript eslint error Parsing error: Unexpected token ...
The answer there suggests using babel-ts or typescript for the parser option but you're using babel-eslint . What exactly did you try? –...
Read more >
JSX parsing error on .tsx · Issue #376 - GitHub
It seems that your issue has been resolved at some point, either in this project or in TypeScript itself, as the source no...
Read more >
@typescript-eslint/parser - npm
An ESLint parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code. NPM Version NPM Downloads. See https ...
Read more >
Documentation - JSX - TypeScript
TypeScript supports embedding, type checking, and compiling JSX directly to JavaScript. Basic usage. In order to use JSX you must do two things....
Read more >
Auto Format with ESLint and Prettier for React TypeScript Project
Resolve import/extensions ... This error means linter cannot resolve tsx file without .tsx extension. So if you write it with ./App.tsx , you...
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