-
-
Notifications
You must be signed in to change notification settings - Fork 1.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 while updating property 'strokeWidth' in shadow node of type: RNSVGLine #583
Comments
Your native bundle is old, and doesn't use the latest version, which supports units in the strokewidth. The units require a string to be passed, as a number cannot represent it. |
Oh, Thanx, I did not know about this update, i'll try updating the version or may be ejecting from expo. |
@tanmaybhatt Provided link is not working, i have same issue please suggest how to fix this |
@lovelyKarthi , I have updated my comment , Are you using Expo? if that's the case then you have to eject from Expo first. In my case after ejecting I updated react-native to 0.52.0 and react-native-svg to 6.0.1-rc.3. Remember to link react-native-svg if you haven't.
Then updated my gradle distribution to 4.1 in android/gradle/wrapper/gradle-wrapper.properties file
Then added google() in buildscript repositories and allproject repositories in android/build.gradle file and change classpath in the same file to com.android.tools.build:gradle:3.0.1
And I guess that was pretty much it and it started to work |
I was working on Expo for quite some time. It uses react-native-svg version 5.5.1. So when I updated to version 6.0.1-rc.3, it started giving this error:
I went into the extractStroke source code and change strokeWidth to parseFloat(strokeWidth) in the return object and it started to work.
Then, I realized that these lines were not there in version 5.5.1 .
Maybe changing strokeWidth to a floating number would solve this issue.
Am I right or am I missing something here?
react-native-svg@6.0.1-rc.3
react-native@0.50.3
The text was updated successfully, but these errors were encountered: