TR kizaki Tech Memo

volta v1.1.1 is super, finally working with pnpm

➜  ~ git:(main) ✗ curl https://get.volta.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10930  100 10930    0     0  22600      0 --:--:-- --:--:-- --:--:-- 23107
  Installing latest version of Volta (1.1.1)
    Checking for existing Volta installation
    Fetching archive for macOS, version 1.1.1
######################################################################## 100.0%
    Creating directory layout
  Extracting Volta binaries and launchers
    Finished installation. Updating user profile settings.
success: Setup complete. Open a new terminal to start using Volta!
➜  ~ git:(main) ✗ volta install pnpm
success: installed pnpm@7.26.0 with executables: pnpm, pnpx

環境変数setするとvolta listにpnpmが表示される

# voltaでenvironent variable setting 
export VOLTA_HOME="$HOME/.volta"
export VOLTA_FEATURE_PNPM=1
export PATH="$VOLTA_HOME/bin:$PATH"
➜  ~ git:(main) ✗ source ~/.zshrc
➜  ~ git:(main) ✗ volta list
⚡️ Currently active tools:

    Node: v19.5.0 (current @ /Users/$HOME/package.json)
    npm: v9.3.1 (current @ /Users/$HOME/package.json)
    pnpm: v7.26.0 (current @ /Users/$HOME/package.json)
    Yarn: v3.3.1 (current @ /Users/$HOME/package.json)
    Tool binaries available:
        gatsby (default)
        ntl, netlify (default)
        npm-check-updates, ncu (default)
        pm2, pm2-dev, pm2-docker, pm2-runtime (default)
        pnpm, pnpx (default)
        solcjs (current @ /Users/$HOME/package.json)
        truffle (default)
        tsc, tsserver (current @ /Users/$HOME/package.json)

See options for more detailed reports by running `volta list --help`.

まだpnpm uninstallしてからのvolta setupするまでには至らないなぁ…やっとnetlifyとpnpm linkできたばかりだからなぁ…下のようにめっちゃ紐付いてるし。

➜  ~ git:(main) ✗ pnpm ls -g
Legend: production dependency, optional only, dev only

/Users/$HOME/Library/pnpm/global/5

dependencies:
netlify-cli 12.7.2
serve 14.1.2