Docs / Programming & Development / How to Set Up a TypeScript Development Environment on Linux

How to Set Up a TypeScript Development Environment on Linux

By Admin · Mar 1, 2026 · Updated Apr 23, 2026 · 26 views · 1 min read

Why TypeScript?

TypeScript adds static typing to JavaScript, catching errors at compile time and improving code maintainability. Setting up a proper TypeScript environment on your Breeze enables productive server-side development with type safety.

Prerequisites

  • A Breeze running Ubuntu 22.04 or later
  • Node.js 18+ installed

Step 1: Install TypeScript Globally

sudo npm install -g typescript ts-node

Verify the installation:

tsc --version
ts-node --version

Step 2: Initialize a Project

mkdir ~/my-ts-project && cd ~/my-ts-project
npm init -y
npm install typescript @types/node --save-dev
npx tsc --init

Step 3: Configure tsconfig.json

Edit tsconfig.json for a Node.js project:

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "commonjs",
    "lib": ["ES2022"],
    "outDir": "./dist",
    "rootDir": "./src",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "resolveJsonModule": true
  },
  "include": ["src/**/*"]
}

Step 4: Add Build Scripts

Update package.json:

"scripts": {
  "build": "tsc",
  "start": "node dist/index.js",
  "dev": "ts-node src/index.ts",
  "watch": "tsc --watch"
}

Step 5: Set Up Linting

npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
npx eslint --init

Using with PM2

For production on your Breeze, compile with npm run build and run the JavaScript output with PM2: pm2 start dist/index.js --name my-app.

Was this article helpful?