Skip to content

dogfood: in-repo apps lack @types/node, so node: builtins show TS errors in VS Code #436

Description

@vivek7405

Problem

A .server.ts in an in-repo app (e.g. examples/blog/modules/posts/queries/get-post.server.ts, website/modules/blog/queries/get-post.server.ts) importing node:fs/promises shows in VS Code:

Cannot find name 'node:fs/promises'. ... Try npm i --save-dev @types/node and add 'node' to the types field in your tsconfig.

#403 fixed this for FRESHLY SCAFFOLDED apps (added @types/node + types: ['node'] to the generator), but the four EXISTING in-repo apps were never updated: examples/blog, website, docs, packages/ui/packages/website all lack @types/node and set no types field. @types/node is only hoisted at the monorepo root, which the CLI tsc resolves but VS Code's tsserver does not reliably pick up for a workspace app.

Fix

For each of the four apps, mirror the scaffold: add @types/node to devDependencies and types: ['node'] to the tsconfig compilerOptions. Regenerate the lockfile.

Acceptance criteria

  • Each in-repo app's .server.ts resolves node: builtins (no TS error in VS Code or webjs typecheck).
  • The four apps match the scaffold's @types/node setup.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions