esbuild React CLI

raw JSON →
0.2.2 verified Fri May 01 auth: no javascript

esbuild-react is a CLI tool (v0.2.2) for scaffolding barebones React projects that compile with esbuild for maximum speed. It is built with oclif and offers optional choices for TypeScript or JavaScript and npm or Yarn as package managers. The package is stable but has very low download volume and appears to be a small utility rather than a widely maintained library. It requires Node >=8.0.0 and ships TypeScript types. Differentiators include its singular focus on fast esbuild-based setup versus alternatives like create-react-app.

error Error: Cannot find module 'esbuild-react'
cause Package not installed globally or missing from node_modules.
fix
Run npm install -g esbuild-react or use npx esbuild-react.
error 'esbuild' is not recognized as an internal or external command
cause esbuild not installed; the CLI may assume esbuild is globally available.
fix
Add esbuild as a dependency: npm install --save-dev esbuild.
gotcha The CLI may require Node >=8.0.0, but newer Node versions (>=14) are recommended for esbuild compatibility.
fix Use Node v14+ for best results.
gotcha The package has not been updated since 2021; check for compatibility with latest React and esbuild versions.
fix Consider using Vite or create-react-app with esbuild if issues arise.
npm install esbuild-react
yarn add esbuild-react
pnpm add esbuild-react

Scaffold a new React project with TypeScript and npm using esbuild as the bundler.

npx esbuild-react my-react-app -l=typescript -p=npm
cd my-react-app
npm start