Open maoguy opened 2 weeks ago
This looks like an exception caused by the npm pack -- uuid.
At present, I have solved the problem with the following methods.
Firstly, download the source code of @chainlit/client v0.1.2 (which in github repo tag:chainlit-1.1.306);
Secondly, put the source code into the react-native project code;
Thirdly,change the import alias etc...In order to import the source code just like my project code;
Fourth,change useChatInteract.ts and state.ts with the following methods
Endly,import the module and use them.
I will continue to monitor this issue and its solution, and keep active updates on ichigo-ichie😄
@dosu Could you please try and help this user along? In addition, could you suggest a more appropriate title for this issue?
To use Chainlit in a React Native app, you might encounter compatibility issues with certain packages like uuid
. Here's a general approach to address these issues:
Identify the Problematic Package: As you've discovered, the uuid
package can cause issues in React Native environments.
Workaround: You can manually integrate the source code of the @chainlit/react-client
package into your project, as you've done. This involves:
useChatInteract.ts
and state.ts
to resolve compatibility issues.Monitor and Update: Keep an eye on updates or fixes from the Chainlit repository or community that might address these compatibility issues more elegantly in the future.
For the issue title, consider something more descriptive like: "Compatibility Issues with @chainlit/react-client
in React Native due to uuid
Package".
If you need further assistance or have specific questions about the modifications, feel free to ask!
To continue talking to Dosu, mention @dosu.
@dosu Could you please try and help this user along? In addition, could you suggest a more appropriate title for this issue?
Can i contribute the a react-native app demo to the cookbooks repo?😃
Yes, contributing a React Native app demo to the cookbooks repository would be a great idea! It could serve as a valuable resource for others facing similar compatibility issues. Make sure to include detailed instructions and any necessary modifications to help others integrate @chainlit/react-client
smoothly into their React Native projects. If you need guidance on how to structure the demo or any specific content to include, feel free to ask!
To continue talking to Dosu, mention @dosu.
Yes, contributing a React Native app demo to the cookbooks repository would be a great idea! It could serve as a valuable resource for others facing similar compatibility issues. Make sure to include detailed instructions and any necessary modifications to help others integrate
@chainlit/react-client
smoothly into their React Native projects. If you need guidance on how to structure the demo or any specific content to include, feel free to ask!To continue talking to Dosu, mention @dosu.
Here I just contributing a React Native app demo to the cookbooks repository -> PR Link pull/156
Please review, thank you.
Description of current situation
when i use @chainlit/react-client in react-native for android app.I get the The following error: