Skip to content

Make global packages always available #13

Open

Description

@rcsilva83

A very nice feature would be to make global packages are always available, like with Volta.

Current behavior

  1. Run npm install -g rimraf with a NodeJS managed by vfox
  2. The rimraf command is available
  3. Run vfox use to a different NodeJS version
  4. The rimraf command isn't found anymore

Expected behavior

  1. Run npm install -g rimraf with a NodeJS managed by vfox
  2. The rimraf command is available
  3. Run vfox use to a different NodeJS version
  4. The `rimraf command is available and it is ran by the NodeJS version on which it was installed.

I guess it may need some major changes to vfox core but it could also benefit other platforms, like Bun, Deno and Python pip packages.

Activity

  1. linghengqian commented on Mar 19, 2025

    @linghengqian
    Member
  2. rcsilva83 commented on Mar 19, 2025

    @rcsilva83
    Author

    Hi @linghengqian. The comment you mentioned doesn't sound a "rejection" of the proposed design to me. The person only describes how nvm works.

    I'm happy with Volta but I need version managers for other languages (Java mainly). If I could stick with a single tool (vfox) for all my "tool version management" needs would be great :)

  3. danreeves commented on Jul 30, 2025

    @danreeves

    asdf-nodejs has a .default-npm-packages feature which handles this nicely https://github.com/asdf-vm/asdf-nodejs#default-npm-packages. I usually don't want every package I install globally to follow me around but it's nice to have an opt-in list of my commonly used tools

  4. linghengqian commented on Sep 21, 2026

    @linghengqian
    Member
    • From my perspective, this issue is a bit odd, given that pnpm has essentially superseded tools like nvm, Volta, and even vfox. pnpm can now manage dependencies for cargo, PyPI, and npm simultaneously, while also handling version management for Node.js, Bun, and Deno.
    • This makes conflicts quite likely from vfox's standpoint.
  5. linghengqian commented on Oct 12, 2026

    @linghengqian
    Member
    • I have the impression that this issue has actually already been resolved by pnpm. It makes no sense to address this issue from the perspective of Node.js, as Node.js is not a package manager.
    • For example, if you execute,
    vfox add nodejs
    vfox install nodejs@26.10.0
    sudo apt install --assume-yes libatomic1
    vfox use --global nodejs@26.10.0
    npm install --global npm@latest
    npx --yes get-pnpm
    source ~/.bashrc
    pnpm add --global @playwright/cli@latest
    • At this point, if you run which playwright-cli, you will find that the installation location of @playwright/cli@latest is completely independent of the Node.js version; no matter which Node.js version you switch to, the global package installed via pnpm remains available.
    lingh@DESKTOP-7B05G9H:~/TwinklingLiftWorks/git/public$ which playwright-cli
    /home/lingh/.local/share/pnpm/bin/playwright-cli
    lingh@DESKTOP-7B05G9H:~/TwinklingLiftWorks/git/public$
    • If there is no response, I will close this issue in a month.
  6. added
    invalidThis doesn't seem right
    questionFurther information is requested
    and removed
    enhancementNew feature or request
    help wantedExtra attention is needed
    invalidThis doesn't seem right
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions