Open santiarr opened 3 years ago
Thanks @santiarr for your patch report.
However, if you do that, you're not really fixing the import but simply importing from the commonJs version of that module, as demonstrated in this sandbox: https://codesandbox.io/s/create-react-app-import-bezier-js-5fxc4
If you wish to patch and still use ES modules, it's better to use this instead:
import { Bezier } from "bezier-js/src/bezier.js"
Yet perhaps even better is to use a resolution method to pin the version, as mentioned in this issue: https://github.com/vasturiano/react-force-graph/issues/282#issuecomment-829112901
Yet perhaps even better is to use a resolution method to pin the version
Just to note, I tried this pinning with a newly created react app, and it did not seem work 😬 (i.e. the failure still appeared with bezier-js 4.0.3). This patching did work though
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
force-graph@1.40.3
for the project I'm working on.I get this when trying to build:
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.