rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[lockfile-explorer] Current version (2.0.7) does not work with my Rush repo with pnpm 8.15.7

Open EasonLin0716 opened this issue 2 months ago • 5 comments

Summary

I tried to use lockfile-explorer to run in my Rush repo, and throw an Error when I run lockfile-explorer:

lockfile-explorer                                 

Rush Lockfile Explorer 2.0.7 - https://lfx.rushstack.io/

Found a Rush workspace:  /path/to/my/project/client/rush.json
The experiment "phasedCommands" has graduated to a standard feature. Remove this experiment from "/path/to/my/project/client/common/config/rush/experiments.json".
App launched on http://localhost:8091
/my-folder/.volta/tools/image/packages/@rushstack/lockfile-explorer/lib/node_modules/@rushstack/lockfile-explorer/lib/graph/lfxGraphLoader.js:254
            throw new Error('Expecting leading "/" in path: ' + JSON.stringify(rawEntryId));
                  ^

Error: Expecting leading "/" in path: "registry.npmjs.org/@_ueberdosis/[email protected]"
    at createPackageLockfileEntry (/my-folder/.volta/tools/image/packages/@rushstack/lockfile-explorer/lib/node_modules/@rushstack/lockfile-explorer/lib/graph/lfxGraphLoader.js:254:19)
    at Object.generateLockfileGraph (/my-folder/.volta/tools/image/packages/@rushstack/lockfile-explorer/lib/node_modules/@rushstack/lockfile-explorer/lib/graph/lfxGraphLoader.js:421:39)
    at /my-folder/.volta/tools/image/packages/@rushstack/lockfile-explorer/lib/node_modules/@rushstack/lockfile-explorer/lib/cli/explorer/ExplorerCommandLineParser.js:155:42

Node.js v22.16.0

Repro steps

Expected result: I expect it to work as it did in 1.7.42 since I downgrade it to that version and it worked.

Actual result: Throws an error and end the process.

Details

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@rushstack/lockfile-explorer version? 2.0.7
Operating system? Mac
Would you consider contributing a PR? I would like to, but not sure if I have time to do it.
Node.js version (node -v)? 22.16.0

EasonLin0716 avatar Dec 03 '25 09:12 EasonLin0716

@octogonz, you recently made a bunch of changes here. Can you investigate?

iclanton avatar Dec 03 '25 19:12 iclanton

@EasonLin0716 could you provide a lockfile that reproduces this error so we can debug it?

octogonz avatar Dec 03 '25 23:12 octogonz

@EasonLin0716 could you provide a lockfile that reproduces this error so we can debug it?

octogonz avatar Dec 03 '25 23:12 octogonz

@octogonz Sorry my repo is private, I asked my supervisor and he said we shouldn't provide it. I will try solving this issue on my own and provide a PR when I have time. Thank you for your help.

EasonLin0716 avatar Dec 04 '25 01:12 EasonLin0716

You could just provide a minimal pnpm-lock.yaml that reproduces the problem, or at least excerpt the lines from your real file so we can see how these paths arise

octogonz avatar Dec 04 '25 04:12 octogonz