Failed to install app with @amazon-devices/react-native-localize version ^2.1.X

Hi @Adrian_Lafontaine_Globant,

Thank you for the detailed bug report on the react-native-localize installation failure.

The react-native-localize 2.1.x package declares a dependency on the com.amazon.kepler.localize_2 system module, but your device firmware (OS 1.1, build
1401010446050) only ships com.amazon.kepler.localize_1. The module hasn’t landed on your device via OTA yet.

This is the same class of issue that was reported with device_info_2 here: Missing com.amazon.kepler.device_info_2@IDeviceInfo_1 dependency ( Missing com.amazon.kepler.device_info_2@IDeviceInfo_1 dependency ) - and the fix is the same.

The fix: Enable Backward Compatibility

This lets your app install on devices regardless of whether they have localize_1 or localize_2:

  1. Install the compatibility library:
npm install @amazon-devices/kepler-compatibility
  1. Add this to your package.json under the kepler block:
{
  "kepler": {
    "backwardCompatibility": {
      "@amazon-devices/react-native-localize": {
        "needs": "2.0.0",
        "wants": "<=2.1.9000000000"
      }
    }
  }
}
  1. Add a runtime check where you call the localize APIs:
import { isPresentOnOS } from '@amazon-devices/kepler-compatibility';

const hasLocalize2 = isPresentOnOS("@amazon-devices/react-native-localize", "2.1.0");
  1. Rebuild and reinstall.

You can also confirm what modules your device currently has:

vega device shell
vpm list modules | grep localize

Some context on why this happened: The June 3 announcement ( Notice: Change impacting Debug Build for React Native Vega Applications (react-native-localize) ) recommended upgrading to 2.1.x to fix debug build crashes, but didn’t mention that some devices haven’t received localize_2 via OTA yet. So developers who followed that guidance are now hitting this install failure. Backward compatibility bridges that gap.

References:

Let us know if you run into anything else after applying the backward compatibility config.

Thanks for helping us improve the Vega platform.

Warm regards,
Aishwarya