且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

找不到react-native-jitsi-meet模块

更新时间:2023-11-18 17:30:58

1-缺少某些东西

丢失 index.js 文件,该文件对于npm packge是必需的.你可以在屏幕截图中看到

There is missing index.js file which is mendatory for npm packge. you can see in screenshot

-

2-您需要执行以下步骤来解决此程序包

第1步:

node_modules/react-native-jitsi-meet/index.js

第2步:

并将此代码添加到该index.js文件中

and this add code in that index.js file

import { NativeModules, requireNativeComponent } from 'react-native';

export const JitsiMeetView = requireNativeComponent('RNJitsiMeetView');
export const JitsiMeetModule = NativeModules.RNJitsiMeetView;
const call = JitsiMeetModule.call;
const audioCall = JitsiMeetModule.audioCall;
JitsiMeetModule.call = (url, userInfo) => {
  userInfo = userInfo || {};
  call(url, userInfo);
}
JitsiMeetModule.audioCall = (url, userInfo) => {
  userInfo = userInfo || {};
  audioCall(url, userInfo);
}
export default JitsiMeetModule;

完成这些步骤后,一切都会正常运行

after these steps everything will be working

节点:,当我们通过npmyarn

我们可以使用 patch-package 自动执行这些步骤

we can use patch-package to automate these steps