AgoraIO-Usecase / AgoraChat-UIKit-rn

MIT License
0 stars 0 forks source link

Error: Unable to resolve module ./icons/Profile/Button_AddError: impossibleser_2x.png from C:\Users\user\Documents\AghoraChatProject\node_modules\react-native-chat-uikit\assets\icons.ts: #1

Open priyaAmzur opened 7 months ago

priyaAmzur commented 7 months ago

Description

Hi, i am getting this error. Can someone support me.

---Error----

None of these files exist:

Version

"react-native-chat-uikit": "^1.0.3"

Output of npx react-native info

---Error----

None of these files exist:

Steps to reproduce

after adding the dependencies and running the project getting the above error.

Snack, code example, screenshot, or link to a repository

import { ChatFragment, GlobalContainer as UikitContainer, UikitModalPlaceholder, } from 'react-native-chat-uikit'; export default function App() { const appKey = ''; const chatId = ''; // The Chat ID. It can be a person or a group. const chatType = 0; // 0 means single person chat. 1 means group chat. return ( <UikitContainer option={{ appKey: appKey }} ModalComponent={() => }

<ChatFragment screenParams={{ chatId, chatType }} /> ); }

Platform

SimulatorOrDevice

iOSVersion

AsteriskZuo commented 7 months ago

It is recommended to use version 2.0.0 or above. But you need to pay attention to compatibility. There is a big difference between version 1.x and version 2.x.

priyaAmzur commented 7 months ago

It is recommended to use version 2.0.0 or above. But you need to pay attention to compatibility. There is a big difference between version 1.x and version 2.x.

tried with "react-native-chat-uikit": "^2.0.0-beta.0" now getting this error after running the project again, Error: Unable to resolve module react-native-chat-sdk from C:\Users\Users\Documents\AghoraChatProject\node_modules\react-native-chat-uikit\src\biz\ContactList\ContactList.hooks.tsx: react-native-chat-sdk could not be found within the project or in these directories: node_modules\react-native-chat-uikit\node_modules node_modules 4 | ChatConversationType, 5 | ChatMultiDeviceEvent,

6 | } from 'react-native-chat-sdk'; | ^ 7 | 8 | // import { DeviceEventEmitter } from 'react-native'; 9 | import { at ModuleResolver.resolveDependency (C:\Users\Users\Documents\AghoraChatProject\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:139:15) at DependencyGraph.resolveDependency (C:\Users\Users\Documents\AghoraChatProject\node_modules\metro\src\node-haste\DependencyGraph.js:277:43) at Object.resolve (C:\Users\Users\Documents\AghoraChatProject\node_modules\metro\src\lib\transformHelpers.js:169:21) at Graph._resolveDependencies (C:\Users\Users\Documents\AghoraChatProject\node_modules\metro\src\DeltaBundler\Graph.js:473:35) at Graph._processModule (C:\Users\Users\Documents\AghoraChatProject\node_modules\metro\src\DeltaBundler\Graph.js:261:38) at async Graph._addDependency (C:\Users\Users\Documents\AghoraChatProject\node_modules\metro\src\DeltaBundler\Graph.js:372:20) at async Promise.all (index 1) at async Graph._processModule (C:\Users\Users\Documents\AghoraChatProject\node_modules\metro\src\DeltaBundler\Graph.js:322:5) at async Graph._addDependency (C:\Users\Users\Documents\AghoraChatProject\node_modules\metro\src\DeltaBundler\Graph.js:372:20) at async Promise.all (index 5)

AmitHBhagat commented 6 months ago

Hi friends, I tried both the versions 1.x and 2.x and got errors.

version 1.x: Error: Unable to resolve module ./icons/Group/Error: impossiblenblock_3x.png from C:\\React Native\agoraChatDemo01\node_modules\react-native-agora-chat-uikit\assets\icons.ts:

version 2.x: Error: Unable to resolve module pure-uuid from C:\DRIVE\Amit\\agoraChatDemo01\node_modules\react-native-chat-uikit\src\utils\uuid.ts: pure-uuid could not be found within the project or in these directories. In the case of version 2.x, it is failing to install a few devDependencies, don't know why.

Can anybody please help in this case?

AsteriskZuo commented 6 months ago

https://github.com/AsteriskZuo/RNTestExample072 You can refer to this sample project to see how its dependencies are handled. react-native does require several necessary dependency libraries.

AmitHBhagat commented 5 months ago

Thanks, @AsteriskZuo we tried the example above but faced issues with version 2.x at the entry point itself.

  1. It seems that the uikit library is missing some dependencies, can you please upgrade the package to include them.
  2. We could not find any documentation or api reference on how to use this library, can you please update the home page for version 2.x, here https://www.npmjs.com/package/react-native-chat-uikit/v/2.0.0-beta.0 agora-rn-chat-uikit-2 x-issue