Bundler Reactor
Bundler Reactor is a command-line interface (CLI) tool designed to quickly scaffold React single-page applications (SPAs). It provides an opinionated boilerplate setup leveraging `pakit` for asset bundling (handling ES6, JSX, CSS, JSON, code splitting, and livereload), `3dub` as a development server with browser history API fallback, and pre-configured integrations for Babel and ESLint. The tool simplifies initial project setup by generating a project structure and `npm` scripts for common tasks like starting a development server (`npm run start`) and creating production builds (`npm run build`). Currently at version 5.0.3, the project appears to have an infrequent release cadence, with the last update over 1.5 years ago, which may lead to out-of-date dependencies or configurations for a rapidly evolving React ecosystem.
Common errors
-
bundler-reactor: command not found
cause The `bundler-reactor` CLI tool was not installed globally or is not in your system's PATH.fixEnsure the package is installed globally using `npm install -g bundler-reactor` and that your npm global bin directory is included in your system's PATH. -
npm ERR! Missing script: start
cause The `start` script, or another npm script like `build`, is not defined in the `package.json` of your generated project, or you are running the command from the wrong directory.fixEnsure you are in the root directory of your `bundler-reactor` generated project (e.g., `cd my-react-app`) and verify that `"scripts": { "start": "...", "build": "..." }` exist in your `package.json` file. -
Error: Cannot find module 'react' or other project-level dependency errors
cause Dependencies for the newly generated `bundler-reactor` project have not been installed, or an installation failed.fixNavigate into your generated project directory (e.g., `cd my-react-app`) and run `npm install` to install all project-specific dependencies. -
Error: Cannot find module '@babel/core' or similar Babel-related build errors
cause The Babel setup within the generated project is outdated or misconfigured, often due to the project's lack of updates reflecting modern Babel versions and configurations, or an incomplete `npm install`.fixCarefully review the `.babelrc` or `babel.config.js` file in your project. Ensure all Babel dependencies are correctly listed and installed. Consider manually upgrading Babel packages and adjusting the configuration to match the latest Babel documentation, especially if using a newer Node.js version.
Warnings
- breaking The `bundler-reactor` project appears to be unmaintained. The last commit and release were over 1.5 years ago. This means generated projects may rely on outdated versions of React, Babel, ESLint, and other ecosystem dependencies, potentially leading to security vulnerabilities, compatibility issues with newer Node.js versions, or missing modern features.
- gotcha The `update` command, used to migrate `bundler-reactor` configurations, carefully avoids overriding modified files in your project. If conflicts occur, the migration will not complete, requiring manual intervention. Files in the `src` folder are never updated if modified.
- gotcha Configuration for core tools like Pakit, Babel, ESLint, and 3dub are managed through specific JSON files (e.g., `.pakit.json`, `.babelrc`, `.eslintrc.json`, `.3dub.json`). Misconfigurations in these files can lead to build failures, incorrect linting, or server issues.
Install
-
npm install bundler-reactor -
yarn add bundler-reactor -
pnpm add bundler-reactor
Imports
- CLI Usage (Scaffold)
import { create } from 'bundler-reactor'; create('my-new-app');bundler-reactor my-new-app
- CLI Usage (Update)
require('bundler-reactor').update();bundler-reactor update
- CLI Installation
import * as BundlerReactor from 'bundler-reactor';
npm install -g bundler-reactor
Quickstart
npm install -g bundler-reactor # Create a new React application boilerplate bundler-reactor my-react-app # Navigate into the new project directory cd my-react-app # Install project-specific dependencies (React, Babel, etc.) npm install # Start the development server and open in browser npm run start # Open your browser to http://localhost:3000 (or as configured by .3dub.json)