插值不起作用-抽屉导航



导入抽屉导航后运行我的项目显示此错误。。。

AppLoading threw an unexpected error when loading:
TypeError:  interpolate is not a function. (In 'interpolate(this.progress, {
inputRange: [PROGRESS_EPSILON, 1],
outputRange: [0, 1]
})', 'interpolate' is undefined)
at node_modulesreact-nativeLibrariesLogBoxLogBox.js:148:8 in registerError
at node_modulesreact-nativeLibrariesLogBoxLogBox.js:59:8 in errorImpl
at node_modulesreact-nativeLibrariesLogBoxLogBox.js:33:4 in console.error
at node_modulesexpobuildenvironmentreact-native-logs.fx.js:27:4 in error
at node_modulesexpo-app-loadingbuildAppLoading.js:11:12 in 
startLoadingAppResourcesAsync._catch$argument_0
at node_modulesreact-nativenode_modulespromisesetimmediatecore.js:37:13 in 
tryCallOne
at node_modulesreact-nativenode_modulespromisesetimmediatecore.js:123:24 in 
setImmediate$argument_0
at node_modulesreact-nativeLibrariesCoreTimersJSTimers.js:130:14 in _callTimer
at node_modulesreact-nativeLibrariesCoreTimersJSTimers.js:181:14 in 
_callImmediatesPass
at node_modulesreact-nativeLibrariesCoreTimersJSTimers.js:441:30 in callImmediates
at node_modulesreact-nativeLibrariesBatchedBridgeMessageQueue.js:387:6 in 
__callImmediates
at node_modulesreact-nativeLibrariesBatchedBridgeMessageQueue.js:135:6 in 
__guard$argument_0
at node_modulesreact-nativeLibrariesBatchedBridgeMessageQueue.js:364:10 in __guard
at node_modulesreact-nativeLibrariesBatchedBridgeMessageQueue.js:134:4 in 
flushedQueue
at [native code]:null in flushedQueue
at [native code]:null in callFunctionReturnFlushedQueue

即使在安装了复活版本1之后,它也显示了不同的错误,而不是这个。

正如TERMINATOR所说,这是一个依赖性问题。使用他提供的链接,或者按照此链接转到另一个线程,但使用不同的解决方案。

这个答案对npm uninstall react-native-reanimated说,然后对npm install react-native-reanimated@2.1.0说。然而,我必须使用npm install --force react-native-reanimated@2.1.0才能将其正确安装在我的机器上。

最新更新