admin管理员组

文章数量:1300005

I recently changed my pnpm and node versions. After changing, my VSCode integrated terminal is refusing to recognise any pnpm CLI files. I get the following error when I try to run any command starting with pnpm:

ERROR Failed to switch pnpm to v10.0.0. Looks like pnpm CLI is missing at "/Users/<user>/Library/pnpm/.tools/pnpm/10.0.0/bin" or is incorrect
spawnSync /Users//Library/pnpm/.tools/pnpm/10.0.0/bin/pnpm ENOENT

Even pnpm -v throws this.

But I can run pnpm commands just fine in the Mac default terminal. I've navigated into the same directory and can run any pnpm commands.

I'm using ohmyzsh everywhere, in case that's relevant.

After reading this post I checked out the paths with echo $PATH. There are some discrepancies, but I don't know what that means.

// vscode terminal
/Users/<user>/.nvm/versions/node/v20.18.3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/<user>/Library/pnpm:/Users/<user>/.nvm/versions/node/v20.18.3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/<user>/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand

/Users/<user>/Library/pnpm:/Users/<user>/.nvm/versions/node/v20.18.3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin

本文标签: