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 'position' of undefined

See original GitHub issue

I learn the usage from the example https://github.com/gaearon/redux-devtools/tree/next/examples/counter :

DevTools = createDevTools(
  <DockMonitor toggleVisibilityKey='H' changePositionKey='Q'>
    <LogMonitor />
  </DockMonitor>
)

ReactDOM.render(
  <div>
    <Provider store={store}>
      <div>
        <App />
        <DevTools />
      </div>
    </Provider>
  </div>
  document.getElementById('app')
)

Then DockMonitor throw an Error Uncaught TypeError: Cannot read property 'position' of undefined, I found it caused by the code https://github.com/gaearon/redux-devtools-dock-monitor/blob/master/src/DockMonitor.js#L74, because props.monitorState is not exist.

Is any step I missed?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
newogacommented, Oct 26, 2015

Hey @bolasblack,

This may or may not be your issue, but I also just ran into this same error and it was because I forgot to add DevTools.instrument() to my store enhancing function.

See this example

0reactions
torgeircommented, Dec 21, 2015

I also hit this, calling require('dev-tools').instrument() directly, and not the .instrument() on my createDevTools(..)-created dev-tools.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'position' of ...
This is all about passing parameter and expose objects. You can't access the ui parameter in your "myFunction" because, if I guess right,...
Read more >
Bug - Uncaught TypeError: Cannot read property 'position' of ...
Hey,. I think you are trying to access the position property of an element which is not a node (may be an edge)....
Read more >
Cannot read property 'position' of undefined at render ...
Uncaught TypeError : Cannot read property 'position' of undefined at render. Hi everyone, this is a part of my code and i always...
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
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