antfu-collective / ni

💡 Use the right package manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doesn't work with pnpm env

ianzone opened this issue · comments

commented

Describe the bug

❯ na env use --global lts
Node.js 18.16.0 is activated
/home/ian/.local/share/pnpm/node -> /home/ian/.local/share/pnpm/nodejs/18.16.0/bin/node
❯  cat $(which nu) | grep nodejs
"/home/ian/.local/share/pnpm/nodejs/18.12.0/bin/node"  "$basedir/global/5/node_modules/@antfu/ni/bin/nu.mjs" "$@"

same for other commands, the node version isn't updated.

Reproduction

execute commands above

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
    Memory: 6.99 GB / 7.69 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.local/share/pnpm/node
    npm: 9.5.1 - ~/.local/share/pnpm/npm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

encountered this issue again when update node using pnpm env, definitely need a command to update the node path.

it seems a pnpm issue actually pnpm/pnpm#6122