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

❗️Issue with @intercom/intercom-react-native and app.config.ts in Expo

  • September 17, 2025
  • 4 replies
  • 223 views

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!

Best answer by alekna_martynas

In my case the issue was Node.js related. I was running Node 22, which caused the Unexpected token 'typeof' error when loading the plugin. Switching back to Node 20 (LTS) fixed it right away.

4 replies

Diogo Silva
Innovator ✨
Forum|alt.badge.img+2
  • Innovator ✨
  • September 18, 2025

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.


  • New Participant
  • Answer
  • September 30, 2025

In my case the issue was Node.js related. I was running Node 22, which caused the Unexpected token 'typeof' error when loading the plugin. Switching back to Node 20 (LTS) fixed it right away.


Forum|alt.badge.img

Hey ​@Tolu_ -- did you ever figure this out? It’s completely broken for us as well (with the same error as you) when we use an app.config.ts file


  • Author
  • New Participant
  • November 26, 2025

Hey ​@Tolu_ -- did you ever figure this out? It’s completely broken for us as well (with the same error as you) when we use an app.config.ts file

@Gianni Settino For me, the issue was with the version of @intercom/intercom-react-native (I can’t recall the exact version), and I had to downgrade.