Skip to content

pnpm build fails on fresh clone — missing @types/node in shared package #1

@Daou

Description

@Daou

After a fresh clone and pnpm install, pnpm build fails at the shared package:

src/adapter.ts(1,30): error TS2307: Cannot find module 'events' or its corresponding type declarations.
src/adapter.ts(2,29): error TS2307: Cannot find module 'http' or its corresponding type declarations.
src/voice-paths.ts(4,22): error TS2307: Cannot find module 'path' or its corresponding type declarations.
src/voice-paths.ts(5,25): error TS2307: Cannot find module 'os' or its corresponding type declarations.
src/voice-paths.ts(6,28): error TS2307: Cannot find module 'fs' or its corresponding type declarations.

shared/package.json imports Node built-in modules but doesn't list @types/node in devDependencies. Adding it fixes the build.

Environment:

  • Node 20.19.0
  • pnpm 10.27.0
  • macOS (Apple Silicon)

Fix:
pnpm --filter @agentdeck/shared add -D @types/node

fix-shared-missing-node-types.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions