Skip to content
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

Issue using Whereby as a web component in an Angular application #497

Open
felicioandre opened this issue Nov 29, 2024 · 2 comments
Open
Assignees

Comments

@felicioandre
Copy link

Hi team,

I'm facing an issue while trying to incorporate the Whereby browser-sdk into my Angular application as a web component.

I'm importing it using the following syntax: import '@whereby.com/browser-sdk/embed';

However, my bundler is throwing an error indicating that React is not installed. I find this odd since web components are supposed to be self-contained, and this dependency shouldn't be required.

I've attached a screenshot of the error for your reference.

image

Could you please provide some guidance on how to resolve this issue? I've ensured that all necessary dependencies are installed and configured correctly.

Thank you for your assistance.

@thyal
Copy link
Member

thyal commented Dec 13, 2024

Hello. This is strange. I just tested in a new angular app and the latest version of browser-sdk, and I don't see this error. The room loads without any errors or warnings. Can you provide a bit more information on your setup? Which version of angular and which version of the browser-sdk are you using? Any code sample would help as well! Thanks

@thyal thyal self-assigned this Dec 13, 2024
@felicioandre
Copy link
Author

Sure, I can provide that:

Angular version: 17.2.0
@whereby.com/browser-sdk version: 3.10.9

On my main.ts file, I added the code to import the component: import "@whereby.com/browser-sdk/embed"

image

At the module of the current page, I added the CUSTOM_ELEMENTS_SCHEMA to schemas array:

image

And I inserted the <whereby-embed ...></whereby-embed> web component tag into my html:

image

But when I start my local server with ng serve, the error appears on terminal:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants