ITADN

Bug: ncu -g fails with pnpm v11 due to new global installation structure

#1707Openonemen 创建于 2026-05-02
bug
O
onemencommented
### Description Running `ncu -g` fails when using **pnpm v11**. In this version, pnpm has changed how global packages are managed: each package is now installed in its own sub-folder containing its own `package.json` and `pnpm-lock.yaml`. It appears `ncu` is not yet compatible with this isolated directory structure, leading to unexpected parsing errors when it attempts to locate or read global dependencies. ### Steps to Reproduce 1. Use **pnpm v11**. 2. Install any global package (e.g., `pnpm add -g eslint`). 3. Run `ncu -g -p pnpm`. ### Actual Results The command fails with a JSON parsing error (likely due to the tool encountering unexpected file structures or metadata in the new sub-folders): ```text Using pnpm Unexpected token '@', "@eslint/co"... is not valid JSON ``` ### Expected Results `ncu` should be able to traverse the new pnpm v11 global storage structure to identify and check updates for all globally installed packages. --- ### Configuration Updates When addressing this, please note that importing global configurations from the new global `config.yaml` format also requires updates to the following fields to ensure they are handled correctly: * `minimumReleaseAge` * `minimumReleaseAgeExclude` ### Environment * **OS:** Windows 11 * **pnpm version:** 11.0.3 * **ncu version:** 22.1.00
2 条评论