Trouble with Metro and the react-native-kepler package

Hi @Devis,

Thank you for your question about the Metro and react-native-kepler package issue.

This is a common issue encountered during the @amzn@amazon-devices namespace migration. The react-native-kepler package provides the Metro resolver config that tells Metro where to find react-native (system-bundled on Vega). A few things to check:

  1. Update your Metro config Your metro.config.js likely still references @amzn/react-native-kepler. Update it:

    const { getDefaultConfig } = require('@amazon-devices/react-native-kepler/metro-config');
    
  2. Migrate remaining @amzn packages You still have @amzn/device-config-lib and @amzn/package-manager-lib under the old scope. Mixing scopes can cause resolution issues — migrate all @amzn packages to @amazon-devices.
    Use the scope migrator tool to catch anything missed (imports, configs, etc.): Developer's Guide: Simplifying npm scope migration with Amazon provided tooling

  3. Clean install

    rm -rf node_modules package-lock.json
    npm install
    
  4. Update your build command Replace build-kepler with build-vega in your package.json scripts — the logs show build-kepler is deprecated.

If the issue persists after these steps, please share your metro.config.js so we can take a closer look.

Thanks for helping us improve the Vega platform.

Warm regards,
Aishwarya