Create TypeScript App
Create TypeScript App (currently version 2.60.1) is a command-line interface (CLI) tool designed to bootstrap or transition JavaScript/TypeScript repositories with an opinionated and comprehensive set of modern development tooling. It maintains an active release cadence, with frequent minor and patch updates, often on a weekly or bi-weekly basis, as evidenced by its rapid version progression. Key differentiators include its 'one-stop-shop' approach, integrating pre-configured solutions for building, testing, automated release management, contributor recognition, and GitHub repository settings. The template emphasizes a strict TypeScript setup and incorporates popular tools like pnpm, ESLint, and Vitest, aiming to provide a robust foundation while remaining highly configurable. While opinionated, it allows users to customize or remove any integrated tooling as needed.
Common errors
-
Error: Node.js version X.Y.Z is not supported. Please use Node.js >=20.19.0.
cause The installed Node.js version on your system is older than the minimum required by `create-typescript-app`.fixUpgrade your Node.js version to 20.19.0 or higher. You can use a tool like nvm (Node Version Manager) or volta to manage Node.js versions: `nvm install 20 && nvm use 20` or `volta install node@20`. -
Command failed with exit code 1: pnpm install
cause The `pnpm` package manager is either not installed, not in the system's PATH, or encountered an issue during dependency installation in the newly created project.fixEnsure `pnpm` is installed globally (`npm install -g pnpm`) and try running `pnpm install` manually in your new project directory. Check network connectivity if the error persists. -
npx: command not found: create-typescript-app
cause The `npx` command failed to locate or execute `create-typescript-app`, possibly due to a corrupted npm cache or network issues preventing download.fixClear your npm cache (`npm cache clean --force`) and then retry the `npx create-typescript-app` command. Ensure your `npm` installation is up-to-date (`npm install -g npm`).
Warnings
- gotcha This template is highly opinionated and sets up a broad range of tooling by default. Users may find it includes more tools or configurations than desired for simpler projects.
- breaking Starting with v2.60.0, the generated ESLint configuration files are now written in TypeScript (`.ts`) instead of JavaScript (`.js`). This change may require adapting editor setups or any custom scripts that directly interact with ESLint configuration files.
- gotcha This tool explicitly requires Node.js version `>=20.19.0` as specified in its `engines` field. Attempting to run `create-typescript-app` with older Node.js versions may lead to unhandled errors, installation failures, or unexpected behavior during project generation.
- gotcha The setup process implicitly expects `pnpm` to be installed and available in the system's PATH for managing project dependencies. While `create-typescript-app` handles the initial project structure, `pnpm` is the preferred package manager for the generated project's operations.
Install
-
npm install create-typescript-app -
yarn add create-typescript-app -
pnpm add create-typescript-app
Quickstart
npx create-typescript-app --owner "YourGitHubUser" --author "Your Name" --email "your.email@example.com" --repository-description "A new TypeScript project with opinionated tooling." --package-name "my-new-ts-app" --mode setup --skip-install