【发布时间】:2022-08-19 19:21:58
【问题描述】:
这个 react native 应用在 Snack.io 中运行流畅。但是,在将其迁移到 VS 代码并安装 yarn 后,它会出现这些错误。可能是什么问题?有没有人遇到过类似的事情?错误可以在下面看到。我对 React JS 很陌生,任何帮助将不胜感激。
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)
-
欢迎来到堆栈溢出!请访问help center,使用tour 了解内容和How to Ask。做一些研究-search SO for answers。如果您遇到困难,请发布您尝试的minimal reproducible example,使用[<>] sn-p 编辑器记录输入和预期输出。
标签: javascript reactjs react-native yarnpkg snackjs