Skip to main content

Troubleshooting

This section provides solutions to common issues you might encounter while using the Nitro Module CLI.

iOS Build Issues

  1. Pod Install Fails

    If you encounter issues during pod install, try the following steps:

    cd yourpackage/ios
    pod deintegrate
    pod install
  2. Missing Header Files

    If Xcode reports missing header files, follow these steps:

    • Clean the build folder in Xcode (Product -> Clean Build Folder).
    • Ensure all native dependencies are properly linked.
    • Rebuild the project.

Android Build Issues

  1. Gradle Sync Failed

    If Gradle sync fails, try cleaning and rebuilding the project:

    cd yourpackage/android
    ./gradlew clean
    ./gradlew build
  2. Missing Dependencies

    If you encounter missing dependencies, check the following:

    • Ensure build.gradle contains the correct dependencies.
    • Sync the project with Gradle files.
    • Invalidate caches and restart Android Studio.

General Issues

  1. Error Invalid Version: latest

    If you encounter an invalid version error, this is due to an issue with the CLI: See issue: Invalid Version: latest

    ✖ Failed to create nitro module: Command failed: bunx -y @react-native-community/cli@latest init TestToSpeechExample --directory path/react-native-module/example --skip-install
    Resolving dependencies
    Resolved, downloaded and extracted [2]
    Saved lockfile
    error Invalid Version: latest.

    To resolve this issue, use the following command: keep trying until it works.

  2. Module Not Found

    If a module is not found, ensure it is properly installed and linked:

    npm install <module-name>
    npx react-native link <module-name>
  3. Command Not Found

    If a CLI command is not recognized, ensure the CLI is installed globally:

    npm install -g create-nitro-module
  4. Permission Denied

    If you encounter permission issues, try running the command with sudo:

    sudo <command>

For additional support, please open an issue on our GitHub repository.