create-nitro-module
v0.19.0
Published
A CLI tool that simplifies creating React Native modules powered by Nitro Modules.
Downloads
722
Maintainers
Readme
🚀 Nitro Module CLI
A CLI tool that simplifies creating React Native modules powered by Nitro Modules.
Features
- 📱 Pre-configured iOS & Android native module templates
- 📦 Automatic linking and installation
- 📚 TypeScript support out of the box
Project Structure
.
├── example
├── react-native-awesome-library
│ ├── AwesomeLibrary.podspec
│ ├── android
│ ├── ios
│ ├── src
│ ├── index.ts
│ └── specs
│ ├── nitrogen
│ ├── nitro.json
│ ├── babel.config.js
│ ├── package.json
│ └── tsconfig.json
├── bun.lockb
└── package.json
Installation & Usage
Quick Start
# Using bun
bun create nitro-module
# Using npx
npx create-nitro-module
# Using pnpm
pnpm create nitro-module
# Using yarn
yarn create nitro-module
# Using global install
nitro-module
CLI Commands
Usage: create-nitro-module [options] [command]
Options:
-v, --version output the version number
-h, --help display help for command
Commands:
create [moduleName] create a new nitro module. If no moduleName is provided,
you will be prompted for one.
generate <moduleName> generate a hybrid object into the package directory
Examples
# Create a new module
bun create nitro-module my-awesome-module
cd example
bun android # build android app
bun ios # build ios app
Troubleshooting
iOS Build Issues
Pod Install Fails
cd yourpackage/ios pod deintegrate pod install
Missing Header Files
- Clean build folder in Xcode
- Ensure all native dependencies are properly linked
- Rebuild the project
Android Build Issues
Gradle Sync Failed
cd yourpackage/android ./gradlew clean ./gradlew build
Missing Dependencies
- Check
build.gradle
for correct dependencies - Sync project with Gradle files
- Invalidate caches and restart Android Studio
- Check
For additional support, please open an issue on our GitHub repository.