{"library":"react-native-cli","title":"React Native CLI Tools","description":"The `react-native-cli` npm package, specifically version 2.0.1 (last updated in 2017), served as the legacy command-line interface for bootstrapping and managing React Native projects. It was designed for global installation, enabling users to create new applications with `react-native init`. However, this package has been superseded; modern React Native development strongly advocates for using `npx react-native` instead. This `npx` approach dynamically fetches and executes the project-local CLI tools (primarily `@react-native-community/cli` or the `react-native` package itself), which ensures compatibility with the specific React Native framework version used in a given project, mitigating issues associated with outdated global CLI installations. The version numbers like v0.85.x seen in recent changelogs refer to the core `react-native` framework package, not this `react-native-cli` wrapper, which has effectively been abandoned.","language":"javascript","status":"abandoned","last_verified":"Thu Apr 23","install":{"commands":["npm install react-native-cli"],"cli":{"name":"react-native","version":null}},"imports":["npx react-native init MyProject","npx react-native init MyProject --template react-native-template-typescript","npx react-native start"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Modern recommended approach using npx to create and manage React Native projects:\nconsole.log(\"// Step 1: Create a new React Native project (recommended)\");\nconsole.log(\"$ npx react-native@latest init AwesomeProject\");\nconsole.log(\"// This command dynamically fetches the necessary CLI tools and template.\");\nconsole.log(\"// It does not require a global 'react-native-cli' installation.\");\nconsole.log(\"\");\nconsole.log(\"// Step 2: Navigate into your new project directory\");\nconsole.log(\"$ cd AwesomeProject\");\nconsole.log(\"\");\nconsole.log(\"// Step 3: Start the development server (Metro Bundler)\");\nconsole.log(\"$ npx react-native start\");\nconsole.log(\"\");\nconsole.log(\"// Step 4: Run the application on a target platform (e.g., iOS simulator)\");\nconsole.log(\"$ npx react-native run-ios\");\nconsole.log(\"\");\nconsole.log(\"// Legacy approach (not recommended due to package abandonment and potential compatibility issues):\");\nconsole.log(\"// $ npm install -g react-native-cli@2.0.1\");\nconsole.log(\"// $ react-native init DeprecatedProject\");\nconsole.log(\"// This legacy package can cause compatibility issues with newer React Native versions.\");","lang":"typescript","description":"Shows how to create and run React Native projects using the recommended `npx` command, emphasizing the deprecation of the global `react-native-cli` npm package.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}