Skip to content

[BUG](arborist) error: Tracker "idealTree:inflate:" already exists #4273

@PenelopeFudd

Description

@PenelopeFudd

What / Why

I've been unable to install anything (e.g. npm install npm-groovy-lint) because of an error that wouldn't go away.

When

  • Every time I try npm install $packagename

Where

  • n/a

How

Current Behavior

  • Type npm install npm-groovy-lint, see 'The package-lock.json file was created with an old version of npm, so supplemental metadata must be fetched from the registry. This is a one-time fix-up, please be patient...', followed by a long list of packages being checked, followed by an error message:
4065 silly inflate node_modules/edge
4066 silly inflate packages/edge
4067 http fetch GET 200 https://registry.npmjs.org/@types%2fnode 1163ms (cache updated)
4068 silly inflate packages/edge/node_modules/keycloak-js
4069 silly inflate node_modules/cas
4070 silly inflate packages/cas
4071 timing idealTree Completed in 22840ms
4072 timing command:install Completed in 22874ms
4073 notice New ^[[33mminor^[[39m version of npm available! ^[[31m7.23.0^[[39m -> ^[[32m7.24.2^[[39m
4073 notice Changelog: ^[[36mhttps://github.com/npm/cli/releases/tag/v7.24.2^[[39m
4073 notice Run ^[[32mnpm install -g [email protected]^[[39m to update!
4074 verbose stack Error: Tracker "idealTree:inflate:" already exists
4074 verbose stack     at Arborist.[_onError] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/tracker.js:107:11)
4074 verbose stack     at Arborist.addTracker (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/tracker.js:31:21)
4074 verbose stack     at Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:716:14)
4074 verbose stack     at run (/usr/local/lib/node_modules/npm/node_modules/promise-call-limit/index.js:30:26)
4074 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/promise-call-limit/index.js:33:7
4075 verbose cwd /home/chowes/work/ns/management-ui
4076 verbose Linux 5.13.19-200.fc34.x86_64
4077 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "install" "npm-groovy-lint"
4078 verbose node v14.17.6
4079 verbose npm  v7.23.0
4080 error Tracker "idealTree:inflate:" already exists
4081 verbose exit 1

Steps to Reproduce

  • Install @npmcli/arborist version 2.9.0 : other versions not tested, as couldn't install anything
  • Have an old lock file
  • Type npm install npm-groovy-lint

Expected Behavior

  • No error, it should "just work"

Steps to Workaround

        const t = `idealTree:inflate:${sloc}`
        this.addTracker(t)
  • New code:
        const rand = Math.random()
        const t = `idealTree:inflate:${sloc}:${rand}`
        this.addTracker(t)
  • With this change, the error Tracker "idealTree:inflate:" already exists went away.
  • It appears that the sloc variable was an empty string two times, leading to a duplicate tracker error message.

Who

  • n/a

References

  • n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingPriority 1high priority issuews:arboristRelated to the arborist workspace

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions