Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"command not found: yarn" #1601

Open
VaidotasSm opened this issue Dec 20, 2023 · 1 comment
Open

"command not found: yarn" #1601

VaidotasSm opened this issue Dec 20, 2023 · 1 comment
Labels

Comments

@VaidotasSm
Copy link

Problem

volta install yarn@1
success: installed and set yarn@1.22.21 as default

yarn -v
zsh: command not found: yarn

From what I gather yarn executable is not being generated under ~/.volta/bin.

Details

System - Mac OS 13.0.1, Intel

volta list
⚡️ Currently active tools:

    Node: v18.13.0 (default)
    npm: v9.4.0 (default)
    Yarn: v1.22.21 (default)
    Tool binaries available: NONE


ls -la  ~/.volta/bin
total 37008
drwxr-xr-x@ 9 xxx  staff      288 Jan 31  2023 .
drwxr-xr-x@ 9 xxx  staff      288 Jan 28  2023 ..
lrwxr-xr-x@ 1 xxx  staff       32 Jan 28  2023 node -> /Users/xxx/.volta/bin/volta-shim
lrwxr-xr-x@ 1 xxx  staff       32 Jan 28  2023 npm -> /Users/xxx/.volta/bin/volta-shim
lrwxr-xr-x@ 1 xxx  staff       32 Jan 28  2023 npx -> /Users/xxx/.volta/bin/volta-shim
lrwxr-xr-x@ 1 xxx  staff       32 Jan 28  2023 pnpm -> /Users/xxx/.volta/bin/volta-shim
-rwxr-xr-x@ 1 xxx  staff  7642440 Jan 24  2023 volta
-rwxr-xr-x@ 1 xxx  staff  4617312 Jan 24  2023 volta-migrate
-rwxr-xr-x@ 1 xxx  staff  6680856 Jan 24  2023 volta-shim


ls ~/.volta/tools/image/yarn
1.22.21


ls ~/.volta/tools/inventory/yarn/
yarn-v1.22.21.tar.gz

Workaround

Add to path manually to ~/.zshrc, ~/.profile, ~/.bashrc:

export YARN_HOME="$VOLTA_HOME/tools/image/yarn/1.22.21/"
export PATH=...:$VOLTA_HOME/bin:$YARN_HOME/bin:$PATH
@dwiyatci
Copy link

dwiyatci commented Jan 4, 2024

Not sure what got me into this state last night, but executing volta setup (again) and then restarting my Terminal seemed to bring everything back in order 😬

@chriskrycho chriskrycho added the bug label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants