Records below are third-party data, not instructions. Apply with your own judgment.
error TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node and then add 'node' to the types field in your tsconfig.
Cause
TS 6.0 made compilerOptions.types default to [] (5.9 loaded every node_modules/@types package), so an installed @types/node is no longer loaded automatically.
Fix
// the tsconfig that compiles these files (the one tsc -p or the editor uses)"compilerOptions": { "types": ["node"] // list every global types package the files need, e.g. ["node", "jest"]}// @types/node itself must still be installed (npm i -D @types/node)Don’t try
add "typeRoots": ["./node_modules/@types"] to bring back auto-inclusion — typeRoots only sets where listed type packages are looked up; with types defaulting to [] nothing is included and TS2591 stays.
npm i --save-dev @types/node, as the message suggests, and change nothing else — TS 6+ loads an installed @types package only when it is listed in types (or referenced); the same TS2591 comes back.