create-tsreact
raw JSON → 0.0.22 verified Sat Apr 25 auth: no javascript
A minimal scaffolder/generator for React + TypeScript projects using esbuild as the compiler and bundler. Current stable version is 0.0.22. It focuses on generating the absolute minimum of files and dependencies, resulting in a small `node_modules` size and fast npm installs. Unlike larger scaffolders like Create React App or Vite templates, create-tsreact provides a bare-bones setup with only essential dependencies, using esbuild for fast builds targeting ES2022. The generated project includes Prettier for formatting and scripts for dev and build. Recommended for learners who want to understand the tech stack without boilerplate.
Common errors
error Cannot find module 'create-tsreact' ↓
cause Running the command without the npm create syntax (e.g., npx create-tsreact).
fix
Use
npm create tsreact@latest <appname> instead of npx create-tsreact. error esbuild: The argument '--target=es2022' is not a valid target ↓
cause Older version of esbuild (pre-0.17) does not support 'es2022'.
fix
Update esbuild to 0.17.0 or later, or change target to 'es2020' in package.json scripts.
Warnings
breaking Requires Node.js >=14 due to esbuild and modern features. ↓
fix Ensure Node.js v14 or later is installed.
gotcha The generated project uses esbuild's default ESM output; CJS is not supported. ↓
fix Use ESM syntax; do not rely on CommonJS require().
gotcha No hot module replacement (HMR) is configured; run `npm run dev` to rebuild on changes. ↓
fix Use `npm run dev` which runs esbuild in watch mode.
Install
npm install create-tsreact yarn add create-tsreact pnpm add create-tsreact Quickstart
npm create tsreact@latest my-app
cd my-app
npm install
npm run dev