Open imballinst opened 2 years ago
Facing the same issue, fixed it with the yarn workaround for now.
for npm user , if you working on Node16+
you can force roughjs version by
npm install --save roughjs@4.4
https://github.com/rough-stuff/wired-elements/issues/179#issuecomment-986052290 it's a fix. Issue can be closed
This issue remains for wired-tabs and wired-listbox using roughjs v4.6.
This is still a problem in the newest version for wired-tabs and wired-listbox
Anyone got a recommendation for a library even close to as good as this one?
Hello! First of all, thank you for creating this library. I wish to submit a bug report (or at least I think it is).
TL;DR
I am getting
hf.fillPolygon is not a function
error when I run a Sandbox locally: https://codesandbox.io/s/react-wrapper-for-wired-elements-forked-fef11?file=/src/index.js.There are 2 options that I think this can be fixed:
roughjs
-- don't use^
. I think locking dependencies can be a good idea because module resolutions are extremely tricky. Change it to4.4
or something, because4.5
is where it breaks.node_modules/wired-elements/lib/wired-lib.js
to this and the problem is gone:Long explanation
I am using the version
0.1.5
version ofwired-elements-react
(https://github.com/rough-stuff/wired-elements-react) -- which I think is a React wrapper, pure, without additional logic for this repository.Things are working OK, except when I am trying to use
wired-tab
, orWiredTab
. This sandbox https://codesandbox.io/s/react-wrapper-for-wired-elements-forked-fef11?file=/src/index.js works fine, but when I downloaded this to my local and ran it, I get this error:Tracing through the error stack, I found out that this is where the code errored: https://github.com/rough-stuff/wired-elements/search?q=fillPolygon.
I tried to find out the version of
roughjs
I am using. If I do fresh install without lockfile, I get this:Now, I think this is an issue, because 10ish days ago, there was a new version in
roughjs
which changesfillPolygon
withfillPolygons
in almost allFiller
classes: https://github.com/rough-stuff/rough/commit/24fd61d3be2dd411f4153b2885ed3d912a3b56fd#diff-054c66f0fb4838b0ff226ca4dea0ebcc007364ff1baf314d788a8015cbac108a. This makes the oldfillPolygon
to be nonexistent, and hence the error shows up.This problem is fixed, if I am using
yarn
and I add this to ensure that child deps are resolved properly:And then the error is gone. Alternatively, I can also confirm that changing the
hashureFill
to this also works (though I'm unsure whether it will cause additional problems or not):