Uncaught TypeError: Cannot read properties of undefined (reading 'DEG2RAD')
See original GitHub issueI’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
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:
- Created a year ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top 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 >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
Should be resolved in 2.0.4
https://github.com/Araniela/reagraph-issue-25
Just run npm start and check the console error. Thank you!