简体   繁体   中英

Invariant Violation: not usable as a native method argument

This react native app runs smoothly in Snack.io. But, after migrating it to VS code and installing yarn, it gives these errors. What could be the issue? Has anyone encountered anything similar? The error can be seen below. I am quite new to React JS, any assistance will be appreciated.

Error: Invariant Violation: [103,"RCTView",{"accessibilityValue":{"min":0,"max":100,"now":"<<NaN>>"}}] is not usable as a native method argument
This error is located at:
    in RCTView (created by View)
    in View (created by ProgressBar)
    in ProgressBar
    in ThemedComponent (created by withTheme(ProgressBar))
    in withTheme(ProgressBar) (created by Timer)
    in RCTView (created by View)
    in View (created by Timer)
    in RCTView (created by View)
    in View (created by Timer)
    in Timer (created by App)
    in RCTSafeAreaView
    in SafeAreaView (created by App)
    in App (created by ExpoRoot)
    in ExpoRoot
    in RCTView (created by View)
    in View (created by AppContainer)
    in DevAppContainer (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent)
 ERROR  Error: Exception in HostFunction: <unknown>

This error is located at:
    in AnimatedComponent
    in AnimatedComponentWrapper (created by ProgressBar)
    in RCTView (created by View)
    in View (created by ProgressBar)
    in ProgressBar
    in ThemedComponent (created by withTheme(ProgressBar))
    in withTheme(ProgressBar) (created by Timer)
    in RCTView (created by View)
    in View (created by Timer)
    in RCTView (created by View)
    in View (created by Timer)
    in Timer (created by App)
    in RCTSafeAreaView
    in SafeAreaView (created by App)
    in App (created by ExpoRoot)
    in ExpoRoot
    in RCTView (created by View)
    in View (created by AppContainer)
    in DevAppContainer (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent)

Have you used animation in you code if yes than please comment that. If you can't figure it out just do one thing comment whole code than one by one uncomment you will find out where problem is.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM