Registry / devops / sm-metro-bundler-cli

sm-metro-bundler-cli

JSON →
library1.0.8jsnpmunverified

sm-metro-bundler-cli is a command-line interface tool designed to customize React Native bundling processes, specifically by adjusting module ID references to use strings instead of incremental numbers. It extends the functionality of the official Metro Bundler CLI. This tool is built upon and specifically compatible with React Native version 0.50.3, a version released in late 2017. Its primary differentiator is the modification of module ID referencing and the inclusion of commands (`init`, `upgrade`, `validate`) for managing project structures based on private templates (`sm-react-native-templates`), indicating a highly specialized use case, likely within a specific organizational context. The current stable version is 1.0.8, and given its reliance on an outdated React Native version, it does not appear to follow a regular release cadence or receive active updates for modern React Native development.

npm install sm-metro-bundler-cli
INSTALL
IMPORT
SIG · SM-METRO-BUNDLER-C
S
sm-metro-bundler-cli
devopsjavascriptv1.0.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Installs the CLI globally and demonstrates bundling a React Native project and initializing a new project.

npm install --global sm-metro-bundler-cli sm-metro-bundler bundle \ --entry-file index.js \ --bundle-output dist/business.jsbundle \ --assets-dest dist \ --platform ios \ --dev false # Example of using a custom command (template source is private) sm-metro-bundler init MyNewProject
sm-metro-bundler-cli --version
Debug
Known issues
breakingThis CLI is explicitly built "Based on React Native 0.50.3". Using it with newer versions of React Native (e.g., 0.60.x and above) will lead to severe compatibility issues and likely outright failure, as Metro Bundler itself has evolved significantly.
fix
Do not use this package for modern React Native projects. Consider using the official Metro CLI or alternative bundlers that support your target React Native version.
affects: >=1.0.0
gotchaThe `init`, `upgrade`, and `validate` commands reference a private repository (`sm-react-native-templates`). These commands are likely non-functional or problematic outside of the original developer's specific corporate environment, leading to unexpected errors or missing templates.
fix
Avoid using the `init`, `upgrade`, or `validate` commands unless you have access to, and are specifically working with, the private template repository. The primary utility for external users is limited to the `bundle` command modifications.
affects: >=1.0.0
deprecatedThe modification of module IDs for 'bundle splitting' or 'stable module IDs' as described in the reference `metro-bundler-cli` (which this project builds upon) might be superseded or handled differently in modern Metro Bundler versions. The techniques used here may not be optimal or necessary for current React Native development workflows.
fix
For modern React Native projects, consult the official Metro documentation for current best practices regarding bundle optimization and module ID handling. Consider tools like Expo CLI which integrate and customize Metro effectively.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'metro' or 'metro-bundler-cli'
The underlying Metro bundler or the specific `metro-bundler-cli` dependency is not installed or discoverable in the expected path by the `sm-metro-bundler-cli` executable.
fix
Ensure `metro` and potentially `metro-bundler-cli` are installed either globally or as local dependencies in your project: `npm install --global metro` or `npm install metro`.
Error: React Native version mismatch. Expected 0.50.3 but found X.Y.Z
Attempting to use `sm-metro-bundler-cli` with a React Native project that uses a version significantly different from 0.50.3, leading to incompatibility within the bundling process.
fix
This package is designed for React Native 0.50.3 projects. For newer React Native versions, use the official `@react-native/community/cli` or directly configure `metro` as appropriate for your version, rather than `sm-metro-bundler-cli`.
Upgrade
Version history
1.0.8latest on npm
Audit
Dependencies
metrorequiredCore JavaScript bundler for React Native that this CLI wraps and extends.
Agent activity
5 hits · last 30 days
node
4
Resources
sm-metro-bundler-cli — npm install sm-metro-bundler-cli · libregistry