Skip to content
Latchkey

TS2580: Cannot find name 'process' - in CI

tsc does not know Node globals like process, require, __dirname, or Buffer without the Node type definitions.

What this error means

Type-checking fails with TS2580 and a hint to install type definitions for node.

tsc
src/config.ts(1,13): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

Common causes

How to fix it

Install @types/node

  1. Add the Node type declarations as a dev dependency
shell
npm i -D @types/node

Ensure node is included

  1. If you pin compilerOptions.types, list node explicitly
tsconfig.json
{
  "compilerOptions": {
    "types": ["node", "vite/client"]
  }
}

How to prevent it

  • Install @types/node wherever build scripts or config touch Node globals, and avoid an over-restrictive types allowlist.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →