-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error node_modules/react-native-vector-icons/lib/create-icon-set.js: #<WeakSet> could not be cloned. #1334
Comments
same here |
any solution to this? I'm facing this error too |
same issue any solution? |
many libraries are throwing this issue Error: # could not be cloned. |
Same here, I just upgraded rn from 0.61.5 to 0.64 and got this issue |
has anyone found a solution to this problem? |
Me too. I got this error. How can we solve this? error: node_modules\react-native-vector-icons\lib\create-icon-set.js: # could not be cloned. |
I have tried with these versions and finally I can build it.
But I don't think it is working properly. Too slow or sometimes stuck. Hope this works fine. |
Facing the same issue |
I think the problem might be with @babel/core and @babel/runtime versions. I downgraded to the below versions and it worked for me; "@babel/core": "^7.12.9", |
@japhet247 , Do you mean with "react-native 0.64.0" and "react-native-vector-icons 8.1.0" ? |
@Silver-IT , Yes |
As @japhet247 said, downgrading If you keep using the versions from the React Native template (https://github.com/facebook/react-native/blob/0.64-stable/template/package.json#L17), you will get higher versions of these libraries (see you package-lock.json):
To fix the problem, only allow patch version updates:
This will install:
Hope that helps. |
Hi, i'm unable to reproduce this with a fresh 0.64 project, most likely this is a problem with your babel setup like @jmikulka mentions. Try setting it to
|
I got this working in But in my case, i need to upgrade @babel/core and @babel/runtime to the lastest version:
later, check package version to be sure that i installed with the lastest version After that, i clean xcode builds then rebuild again and everything works like a charm! |
Thank you SO MUCH |
For those of you dealing with hours of debugging "resolutions": {
"@babel/core": "7.12.*",
"@babel/runtime": "7.12.*"
}, |
Same problem @mjylfz I can't find the code of your screenshot in my node_modules ? |
I don't think this is even related to this library, but I've been having the same issue with babel ever since trying to upgrade to RN 0.65.1 Any other work arounds? |
Same issue with another library, downgrading metro doesn't seem to work. |
I've tried babel upgrading but it didn't worked. All that bug occured after another lib update (which is not connected to vector-icons) and don't know why or how. Like (and thanks to) @mjylfz said you should change the default value setting on async function on source code. On As like; ...
...
async function getImageSource(
name,
size,
color
) {
size = size || DEFAULT_ICON_SIZE,
color = size || DEFAULT_ICON_COLOR
...
...
async function loadFont(file) {
file = file || fontFile
...
... |
What worked for us in the end was not related to babel. |
Unfortunately this doesn't seem to work with
And if I patch that out, I get:
I feel like this is a rabbit hole I don't want to go down |
What worked for me was the same. Delete the lock files and all your node modules. Re-install everything, and double check your lock file to ensure only one babel dependency is listed. |
I second deleting the lock files, it also worked for me |
Thanks, @cristianoccazinsp, and @raimonkh for your suggestion! There was actually an older version lying around which I wasn't aware of 🙌 |
FYI - Deleting the lock files worked for me as well |
The |
@Vannevelj you were able to stay on the babel 7.12 versions but not see the |
We ended up getting around this issue by staying on babel 7.12 using resolutions but grepping for browserlistConfigFile and patching metro to just delete the lines that have that option. We were going from RN64.2 -> RN65.1 |
@eliot1019 what do you mean "patching metro to just delete the lines that have that option" ? |
Facing the Same issue with "react-native": "^0.66.1" and "react-native-vector-icons": "^9.0.0" |
I just did a Works even with So I'm guessing some dependency or sub-dependency had this bug that got solved after upgrading it to the latest patch/minor |
Removing |
I hate babel so much. The absolute worst problems I encounter in JS development always boil down to some cryptic babel issue that NO ONE understands. I'd rather still write ES5 than deal with problems like this. |
Thanks @TheRusskiy #1334 (comment)
and it also working on this version
|
using "react-native": "0.64.0", and "react-native-vector-icons": "^8.1.0"
The text was updated successfully, but these errors were encountered: