【发布时间】:2021-11-29 21:09:37
【问题描述】:
正在使用 react-native 实现 magic.link,但在导入 Magic 时出现错误
import { Magic } from "@magic-sdk/react-native";
错误:
Attempted import error: 'WebView' is not exported from 'react-native'.
我认为它是因为 react-native-webview 的子依赖项已被删除,但我确实安装了它。 npm install --save react-native-webview@^8.0.0 如教程所说?现在卡了一段时间,不知道如何继续使用魔法
https://magic.link/docs/login-methods/email/integration/react-native
此链接附加到文档 https://github.com/react-native-webview/react-native-webview/issues/373 。但不知道为什么它不起作用,因为安装了正确的 react-native-webview 依赖项(8.0.0)或(^8.0.0,即 8.2.1)
我按照教程的建议安装了软件包
yarn add @magic-sdk/react-native
# Ensure the required `peerDependencies` are installed
yarn add react-native-webview@^8.0.0
【问题讨论】:
标签: react-native