TypeScript cannot find Node globals with default VSCode tsconfig

Open Beginner friendly
#575 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
node.js, typescript, vscode
Domain
tooling

Research direction

Start by locating the default tsconfig.json template used when scaffolding a VSCode TypeScript extension and reproduce the reported compilation errors for console and child_process. Update the template so the generated project recognizes Node globals, then verify that a freshly scaffolded extension compiles successfully.

Written by the indexing model from the issue text.

Description

When scaffolding a VSCode typescript extension with the default tsconfig.json, TypeScript reports missing global names such as console and built-in Node modules like child_process.
This makes the default template uncompilable

Image
{
  "compilerOptions": {
    "module": "Node16",
    "target": "ES2022",
    "outDir": "out",
    "lib": [
      "ES2022"
    ],
    "sourceMap": true,
    "rootDir": "src",
    "strict": true
  }
}

The configuration only includes the "ES2022" library, which does not provide Node.js typings and "types": ["node"], isn't included.

Dominant language
JavaScript
Stars
1.6k
Forks
262
Avg merge
15d 22h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-generator-code

All issues in microsoft/vscode-generator-code

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.