-
Notifications
You must be signed in to change notification settings - Fork 68
Feat: Example Helia Angular #425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat: Example Helia Angular #425
Conversation
Hi @Nkovaturient, Great work! Everything functions perfectly, and the implementation looks solid. However, I have a few suggestions to enhance the PR further:
The components look good to me, but @SgtPooki will provide additional feedback on the component structure and styling. Overall, you've done an excellent job here. Keep up the great work 👏 |
Thanks a lot for reviewing and suggesting required changes clearly @paschal533 , |
FYI it looks like the test-angular CI job is hanging. |
@SgtPooki @paschal533 Can you guide me on how to address this. I am not quite familiar with CI config as of now.
|
Hi @Nkovaturient, I see you're having a couple of issues with this PR. Let me address both problems: 1. Lint ErrorsThe build is failing primarily because of ESLint errors. Looking at the error log, there are several common issues:
These are relatively straightforward to fix. You can either:
2. Chrome/X Server IssueRegarding the Chrome issue with missing X server: Since you're developing on Windows but the CI runs in a Linux environment, you're encountering a headless browser configuration issue. Your Angular testing setup is trying to use Chrome but can't find the necessary display server in the CI environment. To fix this in your example project, you'll need to:
If you're not familiar with how testing is set up in the other examples in the repo, I'd recommend looking at similar examples to see how they handle browser testing in CI. Try fixing the lint errors first as they're more straightforward, then we can tackle the Chrome issue if it persists. |
Alright @paschal533 thanks a lot, |
Hey @paschal533, I have resolved lint errors as of now. |
Awesome, well done 🎉 |
@paschal533 ig the chrome/X server issue is back to haunt, I will try to fix it as you advised above.🫡 |
hey @paschal533 , I have implemented the required changes for fixing Chrome/X server issue as advised by you:
kindly review and guide further. |
Hi @Nkovaturient Also, good catch on removing those import types that were causing the injection token issue. Those subtle TypeScript nuances can be tricky to spot. Let me review your PR to see if there's anything else that needs attention. In the meantime, have you run the tests locally to make sure everything's working as expected? If you're still seeing any issues, feel free to share the specific error messages, and we can troubleshoot further. Nice work on addressing these problems systematically 👍 |
Hello there @paschal533 all thanks to your support and yes, I have run the tests locally and ensured the functionality setup correctly. |
@paschal533 ig the type imports are causing "lint errors" as I checked the build err with github copilot? |
@paschal533 kindly guide! |
Hi @Nkovaturient , I see you've been experimenting with different CI configurations. Let's tackle these issues one by one:
Keep me posted on how it goes! |
Issue: #308 #309
Description:
Properly configured, setup and resolved Helia to work seamlessly within the Angular application while maintaining good development practices and build optimization.
Fixes and Updates
Handles initialization states and errors properly
The key changes address:
1)
ERROR NoValidAddressesError: no valid addresses were provided for transports [@libp2p/websockets]
fix: configure the WebSocket transport with proper addresses.
1.Listen for incoming WebSocket connections
2. Connect to bootstrap nodes for peer discovery
3.Properly encrypt connections
4.Handle multiple streams
2)
Error committing text: Error: UnixFS failed to initialize at _HeliaService.<anonymous> (helia.service.ts:85:13) at Generator.next (<anonymous>)
fix: Properly wait for Helia initialization before attempting operations
Add better error handling throughout the application
Show initialization status and errors to the user
3)
Type '() => StreamMuxerFactory' is not assignable to type 'StreamMuxerFactory'.
fix: Adding type annotation : any to the underscore parameter
Double-invoking yamux with ()() to get the actual muxer instance
This adds as any to force the type system to accept the yamux configuration. While not ideal, it should work around the type mismatch between different versions of the libp2p interfaces.
4)
Error fetching committed text: ReferenceError: Buffer is not defined at _CommitTextService.
fix: Since Buffer isn't available in browsers, used Uint8Array instead
Conclusion: