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.

Failed to resolve entry for package "d3-graphviz"

See original GitHub issue

Hi Magjac! Thanks for version 5.0.0. Great work! Tried to make use of it and run into issue. Hope it’s a real issue and I don’t waste your time.

I get the error message Failed to resolve entry for package "d3-graphviz". The package may have incorrect main/module/exports specified in its package.json.

Not fully sure what it means, but my understanding is that the main definition in package.json is faulty. I found these parts in package.json that all look slightly odd:

  "main": "build/d3-graphviz.cjs",
  "type": "module",
  "exports": "./src/index.js",
  "jsnext:main": "index",

Two things that I see that might be tricky.

  1. There are two main definitions that seem to differ (standard vs. jsnext)
  2. Type is module but main file is cjs, so CommonJS, aka not module.

How to reproduce? I use the package in Vita setup, and it is the vite:import-analysis plugin that is throwing the issue.

Thanks! Klaus

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
magjaccommented, Dec 27, 2022

Thanks for the kind words. Sorry about this. I hope I’ve fixed it in v5.0.1. I don’t know how to test it. All this package.json stuff is a bit of black magic to me.

Please let me know how it goes.

0reactions
Vithancocommented, Dec 28, 2022

It does! Thank you so much. I am well impressed by your speed and attention.

Read more comments on GitHub >

github_iconTop Results From Across the Web

d3.graphviz not a function · Issue #94 - GitHub
Hey, New to your package, super excited to render animated SVG like your demo. Having some kind of a trouble setting it up...
Read more >
How to integrate graphviz in angular - d3.js - Stack Overflow
Now I need some assitance how to get it running inside my App. e.g: -what npm package? -which configs? (angular.json, tag or just...
Read more >
rollup.js
These commands assume the entry point to your application is named main.js , and that you'd like all imports compiled into a single...
Read more >
Attributes - Graphviz
Character encoding used when interpreting string input as a text label.. class, Edges, Nodes, Clusters, Graphs, string, "", Classnames to attach ...
Read more >
d3-graphviz - npm
Graphviz DOT rendering and animated transitions for D3. Latest version: 5.0.2, last published: 4 hours ago. Start using d3-graphviz in your project by ......
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