Open ChariseWalraven opened 5 years ago
You need to add output of yarn global bin
to your $PATH
.
I wish Yarn did something to make this more clear though. Perhaps print a message when running yarn global
commands?
@xPaw Thanks! And from a noob's perspective: Yes this should be better explained somewhere. :100:
Did you miss a slash after $HOME
?
Ah lol! Yeah, I just spotted that myself :smile: I must've accidentally removed it when I replaced a part of the output with the $HOME variable :stuck_out_tongue_closed_eyes: :
Anyways, thanks! It worked perfectly when I added the slash :grin:
I wish Yarn did something to make this more clear though. Perhaps print a message when running
yarn global
commands?
That sounds like a great idea :o Something like this:
Warning: The Yarn bin folder (~/.yarn/bin) isn't part of your PATH environment variable - this might cause you problems to access them later.
Had same issue. The yarn global bin
line does the trick in my .zshrc
:
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="$PATH:$(yarn global bin)"
Hello after some digging on internet all solutions doesn't work for me or i'm so dumb that i can't resolve it myself . Can someone help me please .
❯ yarn -v /mnt/c/Users/sylva/AppData/Roaming/npm/yarn: 12: node: not found
same with npm
❯ npm -v : not foundram Files/nodejs//npm: 3: : not foundram Files/nodejs//npm: 5: /mnt/c/Program Files/nodejs//npm: 6: Syntax error: word unexpected (expecting "in")
Thanks a lot for your help this is my outpout of zshrc file , sorry I don't know how to quote the message normally without the font changing ( link of a txt file at the end of this post , sorry again :( )
vim ~/.zshrc
export PATH="$PATH:/usr/local/share/npm/bin"
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi
export ZSH="/home/sylvain/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k" POWERLEVEL9K_MODE="nerdfont-complete"
1,1 Top # Setting this variable when ZSH_THEME=random will cause zsh to load
33,1 29% # Uncomment the following line to disable auto-setting terminal title.
60,0-1 58% # Custom plugins may be added to $ZSH_CUSTOM/plugins/
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
#
87,1 88% # export EDITOR='mvim'
alias
.#
p10k configure
or edit ~/.p10k.zsh.[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh`
*Do you want to request a feature or report a bug
I would like to report a bug
What is the current behavior?
when using
yarn global add
, everything installs as needed, but my shell cannot find the command to use the tool.E.g.
The command isn't found in bash either.
If the current behavior is a bug, please provide the steps to reproduce.
Content of my .zshrc:
content of my .bashrc
This works fine when using npm, just not when using yarn.
I am on an HP Laptop running Ubuntu 18.04, node version 10.9.0.
Any help is really appreciated. I've been fighting with this for months now!