我正试图在iOS中集成Reactive2.0,以响应本地的快速项目,并获得以下错误。Android运行良好,但无法为iOS找到解决方案。
https://docs.swmansion.com/react-native-reanimated/docs/
Error: Requiring module "node_modules/react-native-reanimated/src/Animated.js", which threw an exception: TypeError: Cannot read property 'installCoreFunctions' of undefined, js engine: hermes
软件包信息:
“反应”:"17.0.2",
“反应本地人”:"0.67.0",
“反应-本土化-复苏”:"2.3.1“
爱马仕被启用了。
Babel插件被设置为复活。
多次完成node_module清除和缓存复位。
发布于 2022-01-22 16:55:16
您还没有进行插件配置,在这种情况下,它看起来像是BABEL问题。
请阅读=> https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation
确保你在那里做了所有的事情,如果你做了所有这些,但仍然没有工作,那就试一试。
国家预防机制:
npm start --reset-cache纱线:
yarn start --reset-cache如果还在..。然后删除"node_modules“并通过”纱线“或"npm”重新下载它们(如果你在mac上进行ios开发,则必须"cd ios & pod“)
rm -rf node_modules发布于 2022-02-01 13:05:28
你是否在你的babel.config.js中添加了Reanimated的babel插件?就像这样:
module.exports = {
...
plugins: [
...
'react-native-reanimated/plugin',
],
};还可能出现权限错误,请尝试运行chmod +rwx ./node_modules
发布于 2022-11-11 12:22:20
我用initWithBundleURL初始化rootView,我把它改成了initWithBridge,这帮助我解决了这个问题。
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self
launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"appname"
initialProperties:initialProps ];您可能需要实现类似于这样的sourceURLForBridge
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
}https://stackoverflow.com/questions/70813232
复制相似问题