Skip to content

TypeScript cannot find Node globals with default VSCode tsconfig #575

@bensgilbert

Description

@bensgilbert

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions