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 properties of undefined (reading 'DEG2RAD')

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

Fails to load with image

Expected behavior

It works with an example component

Minimal reproduction of the problem with instructions

  • Use Create-react-app to create basic app
  • npm i reagraph --save
  • Modify App.js to dump in example
import logo from './logo.svg';
import './App.css';
import React from 'react';
import { GraphCanvas } from 'reagraph'

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <img src={logo} className="App-logo" alt="logo" />
        <p>
          Edit <code>src/App.js</code> and save to reload.
        </p>
        <a
          className="App-link"
          href="https://reactjs.org"
          target="_blank"
          rel="noopener noreferrer"
        >
          Learn React
        </a>
        <GraphCanvas
    nodes={[
      {
        id: "n-1",
        label: "1"
      },
      {
        id: "n-2",
        label: "2"
      },
      {
        id: "n-3",
        label: "3"
      },
      {
        id: "n-4",
        label: "4"
      }
    ]}
    edges={[
      {
        id: "1->2",
        source: "n-1",
        target: "n-2",
        label: "Edge 1-2"
      },
      {
        id: "1->3",
        source: "n-1",
        target: "n-3",
        label: "Edge 1-3"
      },
      {
        id: "1->4",
        source: "n-1",
        target: "n-4",
        label: "Edge 1-4"
      }
    ]}
  />
      </header>
    </div>
  );
}

export default App;

  • npm start
  • observe failure in console while nothing is rendered

What is the motivation / use case for changing the behavior?

Environment


Libs:
- react version: ^18.1.0
- realayers version: ^1.0.2


Browser:
- [x] Chrome (desktop) version 102.0.5005.63
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: v18.2.0
- Platform:  Windows

Others:

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
amcdnlcommented, Jul 6, 2022

Should be resolved in 2.0.4

1reaction
Aranielacommented, Jun 28, 2022

https://github.com/Araniela/reagraph-issue-25

Just run npm start and check the console error. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read properties of undefined ...
Uncaught TypeError : Cannot read properties of undefined (reading 'domElement') at init ((index):25:61). which refers to this part of the ...
Read more >
Uncaught TypeError: Cannot read properties of ... - GitHub
Describe the bug While playing with #17346, I've received Uncaught TypeError: Cannot read properties of undefined (reading 'col_index') and Uncaught ...
Read more >
Cannot read properties of undefined' - JavaScript Debugging
How To Fix ' Uncaught TypeError : Cannot read properties of ... "Uncaught Typerror: Cannot set properties of null ( reading 'innerHTML')".
Read more >
How to Fix Uncaught TypeError: Cannot read properties of ...
Uncaught TypeError : Cannot read propertyIf you're a JavaScript developer, you've probably seen this error more than you care to admit.
Read more >
[highcharts-more] Cannot read properties of undefined ...
I've printed out the data any time the chart is set to re-render, ... TypeError: Cannot read properties of undefined (reading 'forEach') at ......
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