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.

Uncaught TypeError: Cannot read property 'displayName' of null

See original GitHub issue

I’m getting this error on a fresh install, using React devtools

backend.js:9159 Uncaught TypeError: Cannot read property 'displayName' of null
    at getDisplayName (backend.js:9159)
    at getDataFiber (backend.js:9880)
    at enqueueMount (backend.js:10137)
    at mountFiber (backend.js:10225)
    at backend.js:10285
    at Set.forEach (<anonymous>)
    at Object.walkTree (backend.js:10283)
    at backend.js:8534
    at <anonymous>:52:32
    at Array.map (<anonymous>)

Seems likely it is related to this issue: https://github.com/facebook/react-devtools/issues/1168

This is my current package.json

  "dependencies": {
    "@babel/plugin-proposal-class-properties": "^7.1.0",
    "@fortawesome/fontawesome-free": "^5.4.2",
    "bootstrap": "^4.1.3",
    "get-video-id": "^3.1.0",
    "jquery": "^3.3.1",
    "lodash": "^4.17.11",
    "react": "^16.6.0",
    "react-dom": "^16.6.0",
    "react-toastify": "^4.4.0",
    "reactstrap": "^6.5.0",
    "source-map-support": "^0.5.9",
    "ytdl-core": "^0.26.3"
  },
  "devDependencies": {
    "@babel/preset-react": "^7.0.0",
    "electron": "2.0.7",
    "electron-builder": "^20.28.1",
    "electron-devtools-installer": "^2.2.4",
    "electron-webpack": "^2.1.2",
    "webpack": "^4.16.5"

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
Pandawancommented, Nov 8, 2018

Strange, I am getting this error even with react and react-dom as 16.5.2.

EDIT: I was able to fix this by clearing the electron cache/data. (Go to userData folder, and delete everything).

1reaction
mstarskicommented, Mar 25, 2019

EDIT: I was able to fix this by clearing the electron cache/data. (Go to userData folder, and delete everything).

I was able to fix it by deleting just the extensions directory inside userData. It incorrectly claimed an error happened when it was installing the React devtools on the next launch, but it worked on the second launch just fine. Seems to happen every time.

Worked for me, thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'displayName' of ...
1 Answer 1 ; () => { setState ; null }); console ; "read error set to null now attempting to fetch data");...
Read more >
Cannot read property 'displayName' of undefined · Issue #7390
Describe the bug Test suite failed to run TypeError: Cannot read property 'displayName' of undefined 1 | import initStoryshots from ...
Read more >
Unable to read 'displayName' of null error. : r/reactjs - Reddit
I'm coding this one segment that is supposed to alert the user to sign in before being able to upload photos.
Read more >
How to fix the error “Cannot read property 'displayName' of ...
This part will be fixed the error 'displayName' of undefined”. And you need to use Named exports because you coded the property of...
Read more >
cannot read properties of undefined (reading 'displayname')
Here's an example of a JavaScript TypeError: Cannot read property of undefined thrown when a property is attempted to be read on an...
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