Repository navigation
Add explicit types: ["node"] to tsconfig - #161
Merged
Merged
Conversation
TypeScript emits `Cannot find name 'path'/'net'/'process'` when compiling `extension.ts` against `vscode-languageclient@10.x` (see #154's failing CI). The messages come with TS's own remedy: "add 'node' to the types field in your tsconfig". The v9 → v10 upgrade drops a transitive that used to trigger auto-inclusion of `@types/node`; declaring `types: ["node"]` explicitly loads `@types/node` regardless. `@types/vscode` is imported by module path and doesn't need to appear in `types`, so IntelliSense on `vscode` APIs is unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"types": ["node"]toclient-vscode/tsconfig.json.vscode-languageclient@10bump in Bump vscode-languageclient from 9.0.1 to 10.1.2 in /client-vscode #154.Context
#154 (bump
vscode-languageclient9 → 10.1.2) is the fix for the three open Dependabot alerts on transitivebrace-expansion@2.0.3(undervscode-languageclient@9→minimatch@5). v10 pulls inminimatch@10→brace-expansion@5.x, clearing all three GHSAs.But #154 fails CI:
TypeScript's own remedy is quoted verbatim: "and then add 'node' to the types field in your tsconfig." On
main,vscode-languageclient@9's type surface transitively triggers auto-inclusion of@types/node; v10 no longer does, so we need to name it explicitly.@types/vscodeis imported via a module path (from "vscode") rather than an ambient global, so it doesn't need to be intypes— the module resolver still finds it vianode_modules/@types/vscode.Test plan
🤖 Generated with Claude Code