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.

Cannot use dagre-d3 in Vue

See original GitHub issue

I’ve ‘npm installed’ dagre-d3 and wanted to use it in my Vue app. But after I imported it as below:

    import dagreD3 from 'dagre-d3'

I got errors like below:

WARNING in ./~/dagre-d3/lib/graphlib.js
5:4-11 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/dagre-d3/lib/dagre.js
5:4-11 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/dagre-d3/lib/lodash.js
5:4-11 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/dagre-d3/lib/d3.js
5:6-13 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
yemanrcommented, Jan 14, 2019

i find there’s no main field in package.json, so import from ‘dagre-d3’ is import the package’s root index.js. there’s a build js in the dist, just import this one will fix it. import dagreD3 from ‘dagre-d3/dist/dagre-d3’;

0reactions
zhangxiaodong1209commented, Apr 18, 2020

wish a exmple

Read more comments on GitHub >

github_iconTop Results From Across the Web

d3.js - Error in mounted hook: "TypeError: edge is undefined ...
I'm trying to set up very simple example with Vue2 using dagre-d3 for rendering directed graphs. Unfortunately, even with extremely simple ...
Read more >
dagre-d3 - npm
A D3-based renderer for Dagre. Latest version: 0.6.4, last published: 3 years ago. Start using dagre-d3 in your project by running `npm i ......
Read more >
dagre-d3-react - npm Package Health Analysis - Snyk
The npm package dagre-d3-react was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >
Zooming in d3.js - The D3 Graph Gallery
Select a zone to zoom on it (X axis only). Double click to unzoom. A clipPath is used to avoid displaying the circle...
Read more >
Automatic Vue.js single-file-components hierarchy graph ...
Use the following controls to add components ( *.vue files) to the list or use the provided default SFC files (for now, you...
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