当我将sendbird SDK安装到expo托管的react本机项目中时,我收到以下错误:
The package at "node_modules/sendbird/SendBird.min.js" attempted to import the Node standard library module "fs". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq/#can-i-use-nodejs-packages-with-expo然而,fs是一个节点包,它不是由react原生运行的环境。我看过Sendbird示例,并在其他应用程序中使用了相同的SDK。我在这方面做错了什么?
发布于 2020-04-02 10:57:08
SendBird在这里!很抱歉,但在JavaScript版本3.0.119中有一个已知的问题导致了它。这将在下一个版本中修复,很快就会出现!在此期间,请根据需要使用版本3.0.118进行构建。
如果您使用的是npm,可以运行以下命令: npm install --save sendbird@3.0.118
https://stackoverflow.com/questions/60983100
复制相似问题