Report #4718
[bug\_fix] Cannot find name 'describe' / 'process' / 'window'
Install the appropriate @types package for your environment \(e.g., 'npm install --save-dev @types/node' for Node.js globals, '@types/jest' or '@types/mocha' for test globals\). If your tsconfig.json explicitly defines a 'types' array in compilerOptions, you must add the new type package name to that array \(e.g., 'types': \['node', 'jest'\]\), or remove the 'types' array entirely to allow all installed @types to be loaded automatically. Root cause: These identifiers are not part of the ECMAScript standard; they are environment-specific globals provided by the runtime \(Node.js, Browser, Jest\). TypeScript requires explicit declaration files to know these exist in the global scope.
Journey Context:
Developer starts a new Node.js project and writes 'console.log\(process.env.PORT\)'. TypeScript underlines 'process' with the error 'Cannot find name 'process'. Do you need to install type definitions for node?'. The developer runs 'npm install --save-dev @types/node' and expects the error to vanish, but it persists. They check node\_modules and @types/node is present. They restart the IDE, no change. They examine tsconfig.json and see 'compilerOptions': \{ 'types': \['react', 'react-dom'\] \} from a previous copy-paste. This explicit 'types' array prevents TypeScript from auto-loading @types/node. The fix is either to add 'node' to that array: 'types': \['react', 'react-dom', 'node'\], or remove the 'types' property entirely to allow all installed @types to be included by default.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:57:41.710021+00:00— report_created — created