EDIT: I’m silly and missed the most obvious thing. Turns out the import is different for Remix apps.
import should be this:
import {Intercom} from '@intercom/messenger-js-sdk';
I’m embedding the an Intercom messenger onto a Remix (react) app. Just following along with the installation instructions it states that I should place this snippet in the client side code of the Component. I’ve done this so far, the snippet looking like this:
import Intercom from '@intercom/messenger-js-sdk';
export default function Home() {
Intercom({
app_id: 'app-id-here',
user_id: …,
name: …,
email: …,
created_at: …
});
return(
<h1>Test Component</h1>
)
}
However, when this component is rendered on the page, it causes this error to be thrown:
TypeError: Intercom2 is not a function
I cant seem to find a reason for this besides something from the Intercom function not working correctly
Any advice would be helpful. Thank you!