🔎 Search Terms
"typescript default config values", "default tsconfig", "What config is used when there's no tsconfig", "What is tsc part of?", "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.", "After installing tsx it broke process", "Is tsconfig part of the typescript repository?"
🕗 Version & Regression Information
- Versions:
"typescript": "^7.0.2" was the version configured
⏯ Playground Link
No response
💻 Code
🙁 Actual behavior
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.
🙂 Expected behavior
The documentation here https://www.typescriptlang.org/tsconfig/#types says:
By default all visible ”Types (@types)” packages are included in your compilation. Packages in node_modules/@types of any enclosing folder are considered visible. For example, that means packages within ./node_modules/@types/, ../node_modules/@types/, ../../node_modules/@types/, and so on.
So, if @types/node is present, why doesn't it include it
Additional information about the issue
Description
The documentation here https://www.typescriptlang.org/tsconfig/#types says:
By default all visible ”Types (@types)” packages are included in your compilation. Packages in node_modules/@types of any enclosing folder are considered visible. For example, that means packages within ./node_modules/@types/, ../node_modules/@types/, ../../node_modules/@types/, and so on.
So, I should ever see
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.
But I do see it, why does it happen, how can I debug this issue. I've tried basic things but I feel like either there's some cache file or something, or I do not understand why it suddenly came back again.
Re-production Steps
Unclear but
- Create a file and name it
index.tsx
npm install --save-dev @types/node``
- Add
console.log(process.env) in the file
- Restart VS Code
not guaranteed, I need help debugging
🔎 Search Terms
"typescript default config values", "default tsconfig", "What config is used when there's no tsconfig", "What is tsc part of?", "Cannot find name 'process'. Do you need to install type definitions for node? Try
npm i --save-dev @types/nodeand then add 'node' to the types field in your tsconfig.", "After installing tsx it broke process", "Is tsconfig part of the typescript repository?"🕗 Version & Regression Information
"typescript": "^7.0.2"was the version configured⏯ Playground Link
No response
💻 Code
🙁 Actual behavior
🙂 Expected behavior
The documentation here https://www.typescriptlang.org/tsconfig/#types says:
So, if
@types/nodeis present, why doesn't it include itAdditional information about the issue
Description
The documentation here https://www.typescriptlang.org/tsconfig/#types says:
So, I should ever see
But I do see it, why does it happen, how can I debug this issue. I've tried basic things but I feel like either there's some cache file or something, or I do not understand why it suddenly came back again.
Re-production Steps
Unclear but
index.tsxnpm install --save-dev@types/node``console.log(process.env)in the filenot guaranteed, I need help debugging