You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After installing the dependency and running in Next.js 13+ i received the following error:
Failed to compile
./node_modules/react-d3-graph/lib/components/graph/Graph.js:10:0
Module not found: Can't resolve 'd3-drag'
Import trace for requested module:
./node_modules/react-d3-graph/lib/index.js
./pages/graph-visualization.tsx
Describe the bug
After installing the dependency and running in Next.js 13+ i received the following error:
Failed to compile
./node_modules/react-d3-graph/lib/components/graph/Graph.js:10:0
Module not found: Can't resolve 'd3-drag'
Import trace for requested module:
./node_modules/react-d3-graph/lib/index.js
./pages/graph-visualization.tsx
https://nextjs.org/docs/messages/module-not-found
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Package working flawlessly
Screenshots
Environment:
After installing d3-drag as a peerDependency inside the package.json of the package (node_modules/react-d3-graph/package.json) the problem was solved
"peerDependencies": {
"d3": "^5.5.0",
"d3-drag": "^3.0.0",
"react": "^16.4.1"
},
I created a dummy quick fix, but not sure whether it is a good approach?
https://github.com/karpinski1994/react-d3-graph/pull/1
Edit:
After just reinstalling d3 to version 7.8.2 I'm having the following error:
Adding d3-drag to peerDependencies of the package also solves it upfront
The text was updated successfully, but these errors were encountered: