Skip to main content
This guide walks you through installing Effect and configuring your development environment for the best experience.

System Requirements

Before installing Effect, ensure your environment meets these requirements:
  • Node.js: Version 18 or newer
  • TypeScript: Version 5.4 or newer
  • Package Manager: npm, pnpm, yarn, or bun
Effect takes full advantage of TypeScript’s type system and requires strict type checking to be enabled.

Installing Effect

Install the effect package using your preferred package manager:
npm install effect
The effect package includes:
  • Core Effect runtime and data types
  • Context and Layer for dependency injection
  • Fiber-based concurrency primitives
  • Stream for reactive programming
  • Schema for validation and parsing
  • And much more

TypeScript Configuration

Effect requires strict type-checking to ensure type safety. Update your tsconfig.json to include these settings:
tsconfig.json
{
  "compilerOptions": {
    "strict": true,
    "moduleResolution": "bundler",
    "module": "ESNext",
    "target": "ES2022",
    "lib": ["ES2022"],
    "skipLibCheck": true
  }
}

Configuration Explained

Enables all strict type-checking options. This is required for Effect to work correctly. It includes:
  • strictNullChecks: Ensures null and undefined are handled explicitly
  • strictFunctionTypes: Enforces stricter function type checking
  • noImplicitAny: Prevents implicit any types
  • And other strict checks
Recommended for modern TypeScript projects. Alternatively, you can use "node16" or "nodenext".
Effect uses modern JavaScript features like generators. Setting target to ES2022 or newer ensures these features are available.
Speeds up compilation by skipping type checking of declaration files. Recommended for most projects.
Effect will not work correctly without "strict": true. This is a hard requirement, not a recommendation.

Editor Setup

For the best development experience, configure your editor with TypeScript support.

Visual Studio Code

VS Code has excellent TypeScript support out of the box. Recommended extensions:
  1. TypeScript and JavaScript Language Features (built-in)
    • Provides IntelliSense, refactoring, and error checking
  2. Error Lens (optional)
    • Shows TypeScript errors inline
    • Install: usernamehw.errorlens
  3. Pretty TypeScript Errors (optional)
    • Makes TypeScript errors more readable
    • Install: yoavbls.pretty-ts-errors

Other Editors

  • WebStorm: Full TypeScript support built-in
  • Neovim: Use typescript-language-server with nvim-lspconfig
  • Emacs: Use tide or lsp-mode with typescript-language-server
  • Sublime Text: Use LSP-typescript

Verifying Installation

Create a test file to verify your installation:
1

Create a test file

Create test.ts in your project:
test.ts
import { Effect } from "effect"

const program = Effect.gen(function* () {
  const result = yield* Effect.succeed("Effect is working!")
  console.log(result)
  return result
})

Effect.runPromise(program)
2

Run the file

Execute the file using your TypeScript runtime:
# Using tsx (recommended for quick tests)
npx tsx test.ts

# Or compile and run with Node.js
npx tsc test.ts && node test.js
You should see:
Effect is working!
3

Check TypeScript errors

Verify TypeScript is checking types correctly:
npx tsc --noEmit
This should complete without errors.
For quick experimentation, install tsx globally: npm install -g tsx. Then run TypeScript files directly: tsx your-file.ts

Optional Tools

These tools enhance your Effect development experience:

Development Runtime

npm install -D tsx
Both tsx and ts-node let you run TypeScript files directly without compilation.

Effect DevTools

The Effect DevTools provide runtime inspection and debugging:
npm install @effect/experimental
Learn more in the Effect DevTools documentation.

Testing

For testing Effect programs, use the official testing utilities:
npm install -D @effect/vitest
See the Testing Guide for details.

Troubleshooting

Ensure your tsconfig.json has "target": "ES2022" or newer. Generators require ES2015+ target.
Try setting "moduleResolution": "bundler" or "node16" in your tsconfig.json.
Effect requires "strict": true in tsconfig.json. This is not optional.
If using Node.js with ES modules, ensure your package.json has "type": "module" or use .mts file extensions.

Next Steps

Now that Effect is installed and configured, you’re ready to build your first application:

Quickstart

Build your first Effect program in 5 minutes

Core Concepts

Learn the core concepts of Effect

Build docs developers (and LLMs) love