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.

Incorporating react-digraph

See original GitHub issue

My v0.13.3 app uses react-digraph, but rather than importing it as a dependency in package.json I have the files in my /app/components/ directory. I did this because I’m customizing it heavily, though I realize this may be the root of my troubles: I’m stuck, trying to figure out why react-digraph seems to work just fine when run with npm run dev but only gives blue screen when I build or package (Mac and Linux). I ran with DEBUG_PROD=true yarn run start and saw in the console Uncaught ReferenceError: Graph is not defined. I made a branch and ran some of the various tests and fixes listed under “scripts” in package.json, but I’m very weak on interpreting the output. Eventually, running DEBUG_PROD=true yarn run start, I was able to finally see a graph (though nothing worked), but with console errors starting with Uncaught TypeError: Cannot read property 'getBBox' of null and trying any of the graph controls gave me Uncaught TypeError: Cannot read property 'clientWidth' of null.

const viewBBox = entities.getBBox(); and const width = parent.clientWidth; are in react-digraph /src/components/graph-view.js.

I intend to upgrade my base project soon, but I want to nail this down first, unless that’s not advised.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
amilajackcommented, Sep 6, 2018

I feel like this is more of a react-digraph question. Try moving this issue there so that they can give you more guidance. If you think this is more of an ERB issue then let us know

0reactions
dbvraccommented, Sep 7, 2018

@vikr01 @amilajack Yes, there are fundamental problems that are not at all specific to ERB. I’m falling back to regroup so I can hopefully come up with some more interesting and relevant problems. Thanks for taking a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

uber/react-digraph: A library for creating directed graph editors
Overview. A React component which makes it easy to create a directed graph editor without implementing any of the SVG drawing or event...
Read more >
React Digraph: A Library for Creating Directed Graph Editors
A React component which makes it easy to create a directed graph editor without implementing any of the SVG drawing or event handling...
Read more >
react-digraph examples - CodeSandbox
Learn how to use react-digraph by viewing and forking react-digraph example apps on CodeSandbox.
Read more >
react-digraph - npm
Start using react-digraph in your project by running `npm i react-digraph`. There are 6 other projects in the npm registry using react-digraph.
Read more >
Building a To-Do List React App with Dgraph
In this tutorial we will build a To-Do List application using React JavaScript library and Dgraph as a backend database.
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