❗️Issue with @intercom/intercom-react-native and app.config.ts in Expo | Community
Skip to main content

Hello!

Has anyone run into this error when using the Intercom Expo plugin (@intercom/intercom-react-native@9.1.1) with an app.config.ts setup?

PluginError: Package "@intercom/intercom-react-native" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

Unexpected token 'typeof'
SyntaxError: Unexpected token 'typeof'
at compileSourceTextModule (node:internal/modules/esm/utils:344:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:105:18)
at ModuleLoader.#translate (node:internal/modules/esm/loader:534:12)

Not sure if this is an issue with the way the plugin is authored or how Expo expects config plugins to behave in a .ts setup.

Would appreciate any insight or workarounds others may have found!

Hello!

Has anyone run into this error when using the Intercom Expo plugin (@intercom/intercom-react-native@9.1.1) with an app.config.ts setup?

PluginError: Package "@intercom/intercom-react-native" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

Unexpected token 'typeof'
SyntaxError: Unexpected token 'typeof'
at compileSourceTextModule (node:internal/modules/esm/utils:344:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:105:18)
at ModuleLoader.#translate (node:internal/modules/esm/loader:534:12)

Not sure if this is an issue with the way the plugin is authored or how Expo expects config plugins to behave in a .ts setup.

Would appreciate any insight or workarounds others may have found!

Hello ​@Tolu_, I hope you are well :)

I imagine the error you're facing with app.config.ts might be related to how Expo processes TypeScript versus JavaScript plugins. Try using app.config.js instead of app.config.ts to see if it resolves the syntax issue.