Skip to content

Pin @types/node dev dependency#84

Merged
MasterOdin merged 1 commit intomainfrom
pin-types-node
Nov 20, 2025
Merged

Pin @types/node dev dependency#84
MasterOdin merged 1 commit intomainfrom
pin-types-node

Conversation

@MasterOdin
Copy link
Member

@MasterOdin MasterOdin commented Nov 20, 2025

As we don't have a package-lock.json file, we use the latest version of transitive dependencies. For whatever reason we have started having errors with @types/node in CI when linting:

Error: node_modules/@types/node/child_process.d.ts(310,9): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/child_process.d.ts(310,17): error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/dgram.d.ts(595,9): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/dgram.d.ts(595,17): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/events.d.ts(403,89): error TS2304: Cannot find name 'Disposable'.
Error: node_modules/@types/node/fs.d.ts(331,9): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/fs.d.ts(331,17): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/fs.d.ts(337,9): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/fs.d.ts(337,17): error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/fs.d.ts(636,9): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/fs.d.ts(636,17): error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/fs.d.ts(2196,48): error TS2304: Cannot find name 'AsyncDisposable'.
Error: node_modules/@types/node/fs.d.ts(2208,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/fs.d.ts(2208,17): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/fs/promises.d.ts(498,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/fs/promises.d.ts(498,17): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/inspector.d.ts(49,66): error TS2304: Cannot find name 'Disposable'.
Error: node_modules/@types/node/net.d.ts(739,9): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/net.d.ts(739,17): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/perf_hooks.d.ts(827,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/perf_hooks.d.ts(827,17): error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/readline.d.ts(54,60): error TS2304: Cannot find name 'Disposable'.
Error: node_modules/@types/node/readline.d.ts(215,9): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/readline.d.ts(215,17): error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/sqlite.d.ts(233,35): error TS2304: Cannot find name 'Disposable'.
Error: node_modules/@types/node/sqlite.d.ts(498,9): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/sqlite.d.ts(498,17): error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/stream.d.ts(628,13): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/stream.d.ts(628,21): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/stream.d.ts(974,13): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/stream.d.ts(974,21): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/test.d.ts(2205,13): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/test.d.ts(2205,21): error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/timers.d.ts(34,53): error TS2304: Cannot find name 'Disposable'.
Error: node_modules/@types/node/timers.d.ts(64,17): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/timers.d.ts(64,25): error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/timers.d.ts(86,51): error TS2304: Cannot find name 'Disposable'.
Error: node_modules/@types/node/timers.d.ts(144,17): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/timers.d.ts(144,25): error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/ts5.6/index.d.ts(29,21): error TS2726: Cannot find lib definition for 'esnext.disposable'.
Error: node_modules/@types/node/v8.d.ts(418,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/v8.d.ts(418,17): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/v8.d.ts(434,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/v8.d.ts(434,17): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.
Error: node_modules/@types/node/web-globals/streams.d.ts(10,9): error TS2502: 'CompressionStream' is referenced directly or indirectly in its own type annotation.
Error: node_modules/@types/node/web-globals/streams.d.ts(17,9): error TS2502: 'DecompressionStream' is referenced directly or indirectly in its own type annotation.
Error: node_modules/@types/node/worker_threads.d.ts(558,9): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.
Error: node_modules/@types/node/worker_threads.d.ts(558,17): error TS2339: Property 'asyncDispose' does not exist on type 'SymbolConstructor'.

Pinning the version of @types/node to an older LTS version fixes the issue. Since it's a minor transitive dependency, I think it's fine to keep it pinned to whatever the lowest version of node that we support is.

Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
@MasterOdin MasterOdin merged commit eac67c1 into main Nov 20, 2025
7 checks passed
@MasterOdin MasterOdin deleted the pin-types-node branch November 20, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments