gpt4 book ai didi

reactjs - react native : Module RCTLog is not a registered callable module (calling logIfNoNativeHook)

转载 作者:行者123 更新时间:2023-12-05 08:06:49 27 4
gpt4 key购买 nike

我制作了一个 React Native 包并发布在 npm 上。

问题是当我在 React Native 应用程序中将代码作为普通组件运行时,它工作正常,没有错误。

当我在 Npm 上发布包并将其作为依赖项下载到我的项目时,应用程序抛出红屏错误。

错误是:

Invariant Violation: Module RCTLog is not a registered callable module (calling logIfNoNativeHook)

__callFunction
index.bundle?platform=ios&dev=true&minify=false:109413:18
<unknown>
index.bundle?platform=ios&dev=true&minify=false:109128:31
__guard
index.bundle?platform=ios&dev=true&minify=false:109369:15
callFunctionReturnFlushedQueue
index.bundle?platform=ios&dev=true&minify=false:109127:21
callFunctionReturnFlushedQueue
[native code]:0

Note: All the code available on Github and the package is available on Npm if you can install it and give me feedback if you get the same error of not also it can be helpful

最佳答案

原因大概是由于this .

我会尝试实现上述建议,基本上将此 var RCTLog = require('RCTLog'); 添加到 index.ios.js 文件中。

关于reactjs - react native : Module RCTLog is not a registered callable module (calling logIfNoNativeHook),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58240078/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com