Twilio 对话 - 获取 React Native 上超出的最大调用堆栈大小

Twilio Conversations - Get Maximum call stack size exceeded on React Native

我正在尝试在 React Native 中使用 javascript 中的 twilio conversations

我收到 RangeError:调用时超出最大调用堆栈大小(本机堆栈深度)

const Conversations = require('@twilio/conversations');

Conversations.Client.create(token)

我的package.json长得像

{
    "@twilio/conversations": "^1.2.2",
    "events": "^3.3.0",
    "react": "17.0.2",
    "react-native": "0.64.2",
    "react-native-navigation": "^7.16.0",
    "react-native-navigation-hooks": "^6.3.0",
    "react-native-twilio-video-webrtc": "https://github.com/blackuy/react-native-twilio-video-webrtc",
    "react-stomp": "^5.1.0",
  }

这是logs

这里是 Twilio 开发人员布道者。

您可以尝试使用 import 而不是 require 导入模块吗?喜欢:

import {Client} from '@twilio/conversations';

如果在创建时更改logLevel,那么您可以从客户端看到更多调试信息:

Client.create(token, { logLevel: 'debug' });