首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法读取未定义的属性“installCoreFunctions”

无法读取未定义的属性“installCoreFunctions”
EN

Stack Overflow用户
提问于 2022-01-22 13:21:06
回答 3查看 4K关注 0票数 11

我正试图在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清除和缓存复位。

EN

回答 3

Stack Overflow用户

发布于 2022-01-22 16:55:16

您还没有进行插件配置,在这种情况下,它看起来像是BABEL问题。

请阅读=> https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation

确保你在那里做了所有的事情,如果你做了所有这些,但仍然没有工作,那就试一试。

国家预防机制:

代码语言:javascript
复制
npm start --reset-cache

纱线:

代码语言:javascript
复制
yarn start --reset-cache

如果还在..。然后删除"node_modules“并通过”纱线“或"npm”重新下载它们(如果你在mac上进行ios开发,则必须"cd ios & pod“)

代码语言:javascript
复制
rm -rf node_modules
票数 2
EN

Stack Overflow用户

发布于 2022-02-01 13:05:28

你是否在你的babel.config.js中添加了Reanimated的babel插件?就像这样:

代码语言:javascript
复制
  module.exports = {
      ...
      plugins: [
          ...
          'react-native-reanimated/plugin',
      ],
  };

还可能出现权限错误,请尝试运行chmod +rwx ./node_modules

票数 1
EN

Stack Overflow用户

发布于 2022-11-11 12:22:20

我用initWithBundleURL初始化rootView,我把它改成了initWithBridge,这帮助我解决了这个问题。

代码语言:javascript
复制
  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self
                                            launchOptions:launchOptions];
  
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"appname"
                                            initialProperties:initialProps ];

您可能需要实现类似于这样的sourceURLForBridge

代码语言:javascript
复制
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70813232

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档