Incorporating react-digraph
See original GitHub issueMy 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:
- Created 5 years ago
- Comments:7 (4 by maintainers)

Top Related StackOverflow Question
I feel like this is more of a
react-digraphquestion. 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@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.