Skip to content

πŸ› [BUG] - "property is not writable, js engine: hermes" - error with Expo SDK 53 + React 19 + pnpm monorepoΒ #11

@dave-hf

Description

@dave-hf

Description

Environment:

  • Expo SDK: 53.0.23
  • React: 19.0.0
  • React Native: 0.79.5
  • Metro: 0.82.5
  • Node.js: 18+
  • Package Manager: pnpm 9.12.0
  • Platform: iOS Simulator, Android Emulator
  • New Architecture: Enabled
  • Hermes: Enabled

Description:

When running an Expo app with the above configuration in a pnpm monorepo, the app consistently
fails to start with the following Hermes engine error:

ERROR [runtime not ready]: TypeError: property is not writable, js engine: hermes
ERROR [runtime not ready]: Invariant Violation: "main" has not been registered. This can
happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop
    it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called.,
    js engine: hermes
    ERROR ExceptionsManager should be set up after React DevTools to avoid console.error arguments
    mutation

Question:

Is this a known compatibility issue between Expo SDK 53, React 19, New Architecture, and pnpm
monorepos? The error suggests that some property is being marked as non-writable during React
DevTools initialization, which prevents the normal app registration flow.

Reproduction steps

Steps to Reproduce:

  1. Create a pnpm monorepo with Expo SDK 53
  2. Enable New Architecture (newArchEnabled: true)
  3. Configure React 19 with pnpm overrides:
  "pnpm": {
    "overrides": {
      "react": "^19.0.0",
      "react-dom": "^19.0.0",
      "@types/react": "^19.0.0"
    }
  }
  4. Set up Metro config for monorepo with symlink support:
  config.resolver.unstable_enableSymlinks = true;
  5. Run expo start and try to load the app

  Actual Behavior:
  App fails to initialize with "property is not writable" Hermes error, preventing
  AppRegistry.registerComponent from being called.

  Expected Behavior:
  App should start normally without Hermes property errors.

  Additional Context:

  - The error persists even when removing all workspace package imports and using only standard
  React Native components
  - The error appears to be related to the timing of React DevTools setup and property
  configuration in Hermes
  - We've tried:
    - βœ… Enabling Metro symlink support (unstable_enableSymlinks: true)
    - βœ… Using hoisted node-linker in .npmrc
    - βœ… Forcing consistent React versions via pnpm overrides
    - βœ… Aliasing React in Metro config to use single instance
    - ❌ None of these resolved the issue

  Relevant Configuration:

  {
    "packageManager": "[email protected]",
    "pnpm": {
      "overrides": {
        "metro": "^0.82.0",
        "metro-config": "^0.82.0",
        "metro-resolver": "^0.82.0",
        "react": "^19.0.0",
        "react-dom": "^19.0.0",
        "@types/react": "^19.0.0"
      }
    }
  }
  {
    "expo": {
      "newArchEnabled": true,
      "platforms": ["ios", "android", "web"]
    }
  }
  const { getDefaultConfig } = require('expo/metro-config');
  const config = getDefaultConfig(__dirname);

  config.resolver.unstable_enablePackageExports = false;
  config.resolver.unstable_enableSymlinks = true;
  config.resolver.alias = {
    'react': path.resolve(projectRoot, 'node_modules/react'),
    'react-native': path.resolve(projectRoot, 'node_modules/react-native'),
  };
  // monorepo configuration...
  

Logs

ERROR  ExceptionsManager should be set up after React DevTools to avoid console.error arguments mutation
 ERROR  [runtime not ready]: TypeError: property is not writable, js engine: hermes
 ERROR  [runtime not ready]: TypeError: property is not writable, js engine: hermes
 ERROR  [runtime not ready]: Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes
➜  expo-app git:(main) βœ—

Browsers

No response

OS

Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions