npm errors
ERESOLVE — Peer dependency resolution failure
Error:ERESOLVE unable to resolve dependency tree
Fix:
- Clean install:
- If still failing, identify the conflict from the error output (“Found: X” vs “Could not resolve: Y”)
- Ensure all dependency versions match the target RN 0.83 requirements
- Never use
--legacy-peer-deps— it masks conflicts that cause runtime errors
Peer react version conflict (cached 0.72)
Error:peer react@... from react-native@0.72 or Conflicting peer dependency: react@19
Cause: Cached react-native@0.72.0 in node_modules conflicts with React 19.
Fix:
"react": "19.2.0", "react-native": "0.83.0", "@types/react": "^19.2.0".
@types/react version mismatch
Error:Found: @types/react@18 / peerOptional @types/react@^19
Fix: Update devDependencies:
ts-jest peer dependency conflict
Error:peer jest@^28.0.0 from ts-jest
Fix: Update ts-jest to match jest v29:
TypeScript errors
tsconfig.json extends not found
Error:TS6053: File '@react-native/typescript-config/tsconfig.json' not found
Fix:
/tsconfig.json suffix)
allowImportingTsExtensions / customConditions
Error:TS5096 or TS5098
Fix: Add overrides to tsconfig.json:
Re-exporting type with isolatedModules
Error:TS1205: Re-exporting a type when 'isolatedModules' is enabled
Fix:
CMake and native build errors
keplerscript target not found
Error:Target links to keplerscript-2 but the target was not found
Fix: In cxx/CMakeLists.txt:
C++20 features not supported
Error:C++20 features not supported
Fix: Ensure CMake 3.22+ and a C++20-compatible compiler (GCC 10+, Clang 12+).
Metro Bundler Errors
Cannot find module ‘@react-native/babel-preset’
Fix:Unable to resolve module
Fix:Jest and testing errors
SyntaxError: Cannot use import statement outside a module (platform package)
Cause:@amazon-devices/react-native-kepler@4.0.0 uses ES modules in its jest setup.
Fix: Add to transformIgnorePatterns in jest.config:
Cannot read properties of undefined (Dimensions/PixelRatio/StyleSheet)
Cause: React 19 changed mock behavior. These APIs aren’t automatically mocked. Fix: Add mocks tojest.setup.js (see Step 7.2).
Can’t access .root on unmounted test renderer
Cause: Wrapping@testing-library/react-native render() in ReactTestRenderer.act().
Fix: Remove act() wrapping — the testing library handles it internally (see Step 7.4).
NativeAnimatedModule method stubs missing
Error:Cannot read properties of undefined (reading 'apply') in NativeAnimatedHelper.js
Cause: RN 0.83 animation system calls 23 specific methods on NativeAnimatedModule.
Fix: Add complete mock to jest.setup.js (see Step 7.2).
Navigation stack timer leak
Error:You are trying to import a file after the Jest environment has been torn down
Fix:
Nested react-native in keplerscript-native-ui-components
Error: Flow/ESM parse errors fromkeplerscript-native-ui-components/node_modules/react-native
Cause: kepler-ui-components@2.x bundles its own copy of react-native.
Fix: Update to @amazon-devices/kepler-ui-components@3.0.0.
Runtime errors
Failed to load runtime module: IKeplerScript_2_0
Cause: manifest.toml still references old Kepler 2.x runtime. Fix: Update manifest.toml runtime-module paths (see Phase 4).Cannot find module ‘@amazon-devices/keplerscript-commonmodules’
Fix: Add to devDependencies:Unrecognized command build-kepler
Cause:@react-native-community/cli was removed.
Fix: Keep in devDependencies:

