reaction-build: React/React Native Build Tool
reaction-build is a command-line interface (CLI) tool designed as a build utility for React and React Native projects. It provides features like React Native compatibility and isomorphic bundling, aiming to produce code usable across various JavaScript environments. Originally associated with the broader "Reaction" ecosystem, potentially Reaction Commerce, its primary function is to abstract away complex build configurations, similar to tools like Create React App or Webpack. The package is currently at version `1.0.0-rc.104`, a release candidate, and has not been updated since late 2018. This indicates that the project is no longer actively maintained and would likely face compatibility issues with modern Node.js versions (it requires `>= 4.0.0`) or contemporary React development practices. It lacks current official usage documentation, requiring users to infer functionality from its source or general build tool patterns.
Common errors
-
Error: Command `build` not found.
cause The `reaction-build` executable was either not installed globally, or the system's PATH environment variable does not include the npm global bin directory.fixEnsure `reaction-build` is installed globally using `npm install -g reaction-build`. Verify your system's PATH includes the directory where npm installs global packages (`npm root -g`). -
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
cause Running `reaction-build` with an older Node.js version on a large project might exhaust the default memory limit, common with build processes.fixIncrease Node.js's memory limit when running the command: `NODE_OPTIONS=--max_old_space_size=4096 reaction-build build` (adjust 4096MB as needed). Consider that this issue might also stem from inherent inefficiencies or outdated dependency versions in the abandoned tool.
Warnings
- breaking The `reaction-build` package is in a release candidate stage (`1.0.0-rc.104`) and has not been updated since late 2018. It never reached a stable 1.0.0 release, indicating its development was halted.
- breaking The package officially supports Node.js versions `>= 4.0.0`. Running it with modern Node.js versions (e.g., Node 16+) will likely lead to incompatibilities, errors, or unexpected behavior due to significant changes in JavaScript, Node.js APIs, and module systems over the years.
- gotcha There is no comprehensive or up-to-date documentation available for `reaction-build` beyond basic installation steps. The `README.md` explicitly states 'Contribute usage docs', implying a lack of official guidance for its features and configuration.
- gotcha Being an abandoned project, there will be no patches for security vulnerabilities, bug fixes, or compatibility updates for new versions of React, React Native, or underlying build dependencies (e.g., Babel, Webpack).
Install
-
npm install reaction-build -
yarn add reaction-build -
pnpm add reaction-build
Imports
- reaction-build CLI
import { build } from 'reaction-build'npm install -g reaction-build reaction-build build
Quickstart
{
"name": "my-react-app",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "reaction-build start",
"build": "reaction-build build --env production",
"test": "reaction-build test"
},
"dependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0"
}
}
// To use:
// 1. Install globally: npm install -g reaction-build
// 2. Navigate to your project directory.
// 3. Install local dependencies: npm install
// 4. Run the build command:
// npm run build
//
// This command would typically compile your React application for deployment.