Error while parsing TypeScript React (tsx)
See original GitHub issueJust 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:
- Created 6 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The highlight still does not work in TSX files 😕
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!