【问题标题】:react-native auth0 Missing NativeModulereact-native auth0 缺少 NativeModule
【发布时间】:2019-05-29 23:51:35
【问题描述】:

我目前正在开发一个包含用于登录目的的 Auth0 的 react native 项目。 当我尝试配置包时,它给了我这个错误:

Error: Missing NativeModule. Please make sure you run `react-native link react-native-auth0`
    at Agent.newTransaction (agent.js:33)
    at WebAuth.authorize (index.js:55)
    at App (App.js:23)
    at instantiate (createClassProxy.js:94)
    at new App (eval at proxyClass (createClassProxy.js:112), <anonymous>:4:17)
    at constructClassInstance (ReactNativeRenderer-dev.js:8871)
    at updateClassComponent (ReactNativeRenderer-dev.js:11400)
    at beginWork (ReactNativeRenderer-dev.js:12588)
    at performUnitOfWork (ReactNativeRenderer-dev.js:15852)
    at workLoop (ReactNativeRenderer-dev.js:15892)

我以为是链接模块出错,所以我手动做了,但没有任何变化。

【问题讨论】:

标签: ios react-native react-native-ios auth0


【解决方案1】:

可能我迟到了。但张贴以供将来参考。 React Native CLI 提供了自动链接功能,它取代了命令 react-native link。

对于IOS,只需运行

cd ios && pod install && cd .. 

https://github.com/react-native-community/cli/blob/master/docs/autolinking.md#autolinking

【讨论】:

    猜你喜欢
    • 2023-01-31
    • 1970-01-01
    • 2018-05-11
    • 2022-01-03
    • 2020-05-20
    • 2021-04-15
    • 2019-12-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多