Skip to content

bug: @libp2p/bootstrap and @libp2p/interface peer dependencies not correctly added #2199

@nicobao

Description

@nicobao

Hey there!

I get this error with @waku/sdk v0.0.29 when running pnpm dev (obviously done after having pnpm install successfully):

node:internal/process/esm_loader:34
      internalBinding('errors').triggerUncaughtException(
                                ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@libp2p/bootstrap' imported from /home/nicobao/zkorum/agora/services/api/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]/node_modules/@waku/sdk/dist/create/libp2p.js

After I try pnpm add @libp2p/bootstrap and run the app, I get the following error:

node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@waku/core/src/lib/connection_manager.ts:2
import { CustomEvent, TypedEventEmitter } from "@libp2p/interface";
         ^

SyntaxError: The requested module '@libp2p/interface' does not provide an export named 'CustomEvent'

So I try pnpm add @libp2p/interface and I get the following error:

± |main {3} U:7 ?:1 ✗| → pnpm add @libp2p/interface
 WARN  3 deprecated subdependencies found: @esbuild-kit/[email protected], @esbuild-kit/[email protected], @libp2p/[email protected]
Already up to date
Progress: resolved 923, reused 879, downloaded 0, added 0, done
 WARN  Issues with peer dependencies found
.
└─┬ @waku/sdk 0.0.29
  ├── ✕ unmet peer @libp2p/bootstrap@^10: found 11.0.16
  └─┬ @waku/discovery 0.0.6
    └── ✕ unmet peer @libp2p/interface@^1.6.3: found 2.3.0

Minimal Repro with my setup (ESM, pnpm, TypeScript, backend Fastify): https://github.com/nicobao/waku-repro

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions