expo-notifications error on install

Please provide the following:

  1. SDK Version: 49
  2. Platforms(Android/iOS/web/all): iOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

I am getting the following error on Expo when I install expo-notifications and try to use any functionality of it.

Right now I am not yet trying to send any notifications, I am just at the stage of installing the library and getting the permission status. It is not just that functionality that is specifically broken, any time I try to use expo-notifications in any way I get this error.

ERROR TypeError: Cannot read property ‘isPromise’ of undefined, js engine: hermes

I have managed to track this error down, if anyone finds this the error was in the inline 'require() statement in the above screenshot. I fixed by updating my metro config to include an inlineRequires statement:

config.transformer = {
  getTransformOptions: async () => ({
    transform: {
      experimentalImportSupport: false,
      inlineRequires: true,

I found this solution by spending a lot of hours on Github issues and eventually found this as a solution to another seperate error message. My exisiting metro config is exactly as the docs state here https://docs.expo.dev/guides/monorepos/ and this bug was caused by an official package. I appreciate that these errors can happen however some extra documentation may be needed if this is required to fix.

Hey @gazmatron, glad you were able to resolve this issue. Sorry for the inconvenience!

Thank you for sharing your solution and for the feedback to improve documentation. I think this error might be unique to monorepos instead of expo-notifications library (not sure how). Haven’t seen anyone else reporting this but will share this internally and if required, update the documentation.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.