question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while updating property 'strokeWidth' in shadow node of type: RNSVGLine

See original GitHub issue

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:

screenshot_20180121-180718

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 .

if (!strokeWidth || typeof strokeWidth !== 'string') {
        strokeWidth = `${strokeWidth || 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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

7reactions
tanmaybhattcommented, Jan 24, 2018

@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 I changed my compileSdkVersion to 27, buildToolsVersion to “27.0.1” and changed android support dependency version to “com.android.support:appcompat-v7:27.0.1” in android/app/build.gradle file.

...
android {
    compileSdkVersion 27
    buildToolsVersion "27.0.1"
    ....
    dependencies {
         compile project(':react-native-svg')
         compile fileTree(dir: "libs", include: ["*.jar"])
         compile "com.android.support:appcompat-v7:27.0.1"
         compile "com.facebook.react:react-native:+"  // From node_modules
    }
    ....

Then updated my gradle distribution to 4.1 in android/gradle/wrapper/gradle-wrapper.properties file

distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

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

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        google()
    }
}

And I guess that was pretty much it and it started to work

1reaction
tanmaybhattcommented, Jan 24, 2018

Okay, Thank you so much, it took some time but got it to work after making a new project from react-native init and following the steps over here #584 and here #581

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while updating property 'strokeWidth' in shadow node of ...
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...
Read more >
React-Native : Error while updating property 'd' in shadow ...
In my case I am down loading Flat icons in svg format and then converting the svg to react-native format by using this...
Read more >
react-native-svg - npm
Supports most SVG elements and properties (Rect, Circle, Line, Polyline, Polygon, G ...). Easy to convert SVG code to react-native-svg.
Read more >
error while updating property 'justifycontent' in shadow node of ...
error while updating property 'justifycontent' in shadow node of type rctview. Without a standalone repro or more context on the places in your...
Read more >
Free Automated Malware Analysis Service - Hybrid Analysis
7f8792c872469f8c4eaa992aa466fa138ca3465c. This report is generated from a file or URL submitted to this webservice on July 11th 2021 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found