-
-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
As a result of using @pnpm/read-project-manifest as can be seen in this line of code
The code crashes (running the app on dev or build) because there's a direct connection @pnpm/read-project-manifest -> @pnpm/manifest-utils -> @pnpm/logger and therefore @pnpm/logger is needed.
On Yarn projects (with or without Plug n' Play) it crashes:
error when starting dev server:
Error: @pnpm/manifest-utils tried to access @pnpm/logger (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
Required package: @pnpm/logger
Required by: @pnpm/manifest-utils@virtual:16f66a2f5953bf48876c5f3e66b1351cbb0b7fdf9bfdb7c7b7d6e534450712b532f53753d4bb0e0e5501941a17696ea469433cc97336e18719e8c2ea1fad1600#npm:1002.0.0 (via /Users/foo/project/.yarn/__virtual__/@pnpm-manifest-utils-virtual-09cd75cd97/4/.yarn/berry/cache/@pnpm-manifest-utils-npm-1002.0.0-7424c263ab-10c0.zip/node_modules/@pnpm/manifest-utils/lib/)
Ancestor breaking the chain: @vitejs/devtools-vite@npm:0.0.0-alpha.17
Require stack:
- /Users/foo/project/.yarn/__virtual__/@pnpm-manifest-utils-virtual-09cd75cd97/4/.yarn/berry/cache/@pnpm-manifest-utils-npm-1002.0.0-7424c263ab-10c0.zip/node_modules/@pnpm/manifest-utils/lib/convertEnginesRuntimeToDependencies.js
- /Users/foo/project/.yarn/__virtual__/@pnpm-manifest-utils-virtual-09cd75cd97/4/.yarn/berry/cache/@pnpm-manifest-utils-npm-1002.0.0-7424c263ab-10c0.zip/node_modules/@pnpm/manifest-utils/lib/index.js
- /Users/foo/project/.yarn/__virtual__/@pnpm-read-project-manifest-virtual-16f66a2f59/4/.yarn/berry/cache/@pnpm-read-project-manifest-npm-1001.2.0-4955c2fb93-10c0.zip/node_modules/@pnpm/read-project-manifest/lib/index.js
at require$$0.Module._resolveFilename (/Users/foo/project/.pnp.cjs:13209:13)
at defaultResolveImpl (node:internal/modules/cjs/loader:1021:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1026:22)
at Function.<anonymous> (node:internal/modules/cjs/loader:1175:37)
at require$$0.Module._load (/Users/foo/project/.pnp.cjs:13095:31)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Module.require (node:internal/modules/cjs/loader:1445:12)
at require (node:internal/modules/helpers:135:16)
at Object.<anonymous> (/Users/foo/project/.yarn/__virtual__/@pnpm-manifest-utils-virtual-09cd75cd97/4/.yarn/berry/cache/@pnpm-manifest-utils-npm-1002.0.0-7424c263ab-10c0.zip/node_modules/@pnpm/manifest-utils/lib/convertEnginesRuntimeToDependencies.js:4:18)
I also tested on NPM and Bun, with those the issues does not occur.
Reproduction
https://github.com/yannbf/devtools-repro
System Info
System:
OS: macOS 15.6.1
CPU: (10) arm64 Apple M1 Pro
Memory: 144.63 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.18.0 - /Users/yannbraga/.n/bin/node
Yarn: 4.11.0 - /Users/yannbraga/.n/bin/yarn
npm: 11.6.2 - /Users/yannbraga/.n/bin/npm
bun: 1.1.17 - /Users/yannbraga/.n/bin/bun
Watchman: 2025.07.21.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 142.0.7444.135
Chrome Canary: 144.0.7526.0
Edge: 142.0.3595.65
Firefox: 144.0
Safari: 18.6
Safari Technology Preview: 16.4Used Package Manager
yarn
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working