Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing peer dependency undici #1487

Closed
bajtos opened this issue Nov 22, 2022 · 4 comments
Closed

Missing peer dependency undici #1487

bajtos opened this issue Nov 22, 2022 · 4 comments
Labels
need/author-input Needs input from the original author

Comments

@bajtos
Copy link
Contributor

bajtos commented Nov 22, 2022

  • Version: libp2p 0.40.0, pnpm 7.17.0
  • Platform: Darwin komp21x.local 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000 arm64
  • Subsystem: 🤷🏻

Severity:

Low

Description:

Run pnpm add libp2p

An issue with peer dependencies deep in the dependency tree is reported:

dependencies:
+ libp2p 0.40.0

 WARN  Issues with peer dependencies found
.
└─┬ libp2p 0.40.0
  └─┬ @libp2p/connection 4.0.2
    └─┬ @libp2p/interface-connection 3.0.3
      └─┬ @multiformats/multiaddr 11.0.7
        └─┬ dns-over-http-resolver 2.1.0
          └─┬ native-fetch 4.0.2
            └── ✕ missing peer undici@"*"

I think the issue is in @achingbrain's native-fetch module, but I think it's still worth reporting the problem here in the libp2p repo, since it directly affects libp2p users.

Steps to reproduce the error:

  1. Create a new Node.js project
  2. Run pnpm add libp2p
@bajtos bajtos added the need/triage Needs initial labeling and prioritization label Nov 22, 2022
@bajtos
Copy link
Contributor Author

bajtos commented Nov 22, 2022

The same problem applies to pnpm add '@libp2p/tcp' too.

dependencies:
+ @libp2p/tcp 6.0.3

 WARN  Issues with peer dependencies found
.
└─┬ @libp2p/tcp 6.0.3
  └─┬ @libp2p/interface-connection 3.0.3
    └─┬ @multiformats/multiaddr 11.0.7
      └─┬ dns-over-http-resolver 2.1.0
        └─┬ native-fetch 4.0.2
          └── ✕ missing peer undici@"*"

@achingbrain
Copy link
Member

Thanks for reporting this. This module doesn't depend on native-fetch - dns-over-http-resolver does so that's where the missing peer dep should be added.

This is the repo - https://github.com/vasco-santos/dns-over-http-resolver - would you like to put a quick PR together?

@p-shahi p-shahi added need/author-input Needs input from the original author and removed need/triage Needs initial labeling and prioritization labels Nov 22, 2022
@bajtos
Copy link
Contributor Author

bajtos commented Nov 23, 2022

Thanks for reporting this. This module doesn't depend on native-fetch - dns-over-http-resolver does so that's where the missing peer dep should be added.

This is the repo - https://github.com/vasco-santos/dns-over-http-resolver - would you like to put a quick PR together?

Makes sense. I found an existing issue in dns-over-http-resolver repo that seems to describe the same problem: vasco-santos/dns-over-http-resolver#44

Let's continue the discussion there.

@achingbrain
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/author-input Needs input from the original author
Projects
None yet
Development

No branches or pull requests

3 participants