rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[lockfile-explorer] Lockfile explorer no longer works with latest version in non-rush repo

Open nickschaap opened this issue 3 months ago • 3 comments

Summary

We use lockfile-explorer as a tool for analyzing our pnpm lockfile. It's awesome! Something seem to have broke with the latest major upgrade of the tool.

Repro steps

  1. Install the latest lockfile explorer globally
  2. Run lockfile-explorer in a directory contained pnpm-lock.yaml

Expected result:

Should work similar to how it worked with v1.7.42

Actual result:

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

App launched on http://localhost:8091
/Users/schaap/.local/share/fnm/node-versions/v18.18.2/installation/lib/node_modules/@rushstack/lockfile-explorer/lib/graph/lockfilePath.js:87
                throw new Error('getAbsolutePath(): relativePath goes above the root folder');
                      ^

Error: getAbsolutePath(): relativePath goes above the root folder
    at Object.getAbsolute (/Users/schaap/.local/share/fnm/node-versions/v18.18.2/installation/lib/node_modules/@rushstack/lockfile-explorer/lib/graph/lockfilePath.js:87:23)
    at createProjectLockfileEntry (/Users/schaap/.local/share/fnm/node-versions/v18.18.2/installation/lib/node_modules/@rushstack/lockfile-explorer/lib/graph/lfxGraphLoader.js:214:49)
    at Object.generateLockfileGraph (/Users/schaap/.local/share/fnm/node-versions/v18.18.2/installation/lib/node_modules/@rushstack/lockfile-explorer/lib/graph/lfxGraphLoader.js:389:30)
    at /Users/schaap/.local/share/fnm/node-versions/v18.18.2/installation/lib/node_modules/@rushstack/lockfile-explorer/lib/cli/explorer/ExplorerCommandLineParser.js:155:42

Node.js v18.18.2

Details

Standard questions

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

Question Answer
@rushstack/lockfile-explorer version? 2.0.1
Operating system? Mac
Would you consider contributing a PR? No
Node.js version (node -v)? v18.18.2

nickschaap avatar Oct 06 '25 17:10 nickschaap

@octogonz - Can you take a look at this? You made changes here recently.

iclanton avatar Oct 06 '25 18:10 iclanton

@nickschaap could you give a me a GitHub branch that repros the issue? we did test this

octogonz avatar Oct 06 '25 18:10 octogonz

(I'm also reachable on Zulip or BlueSky if you want to privately share an internal repro.)

octogonz avatar Oct 07 '25 07:10 octogonz