I have installed yarn using commandnpm install -g yarn
It showed that it installed 1 package, but when I run command yarn -v , it says zsh: command not found: yarn
I tried install via sudo
clean npm cache
also tried all these commands
npm install -gnpmmkdir ~/.npm-globalnpm config set prefix ‘~/.npm-globalecho ‘ export PATH=~/.npm-global/bin:$PATH’ >> ~/.bash_profilesource ~/.bash_profileexport PATH=~/.npm-global/bin:$PATH`
Nothing worked. Please advise
Details
I have installed yarn using command
mkdir
source ~/.bash_profile
export PATH=~/.npm-global/bin:$PATH` Nothing worked. Please advise
npm install -g yarn
It showed that it installed 1 package, but when I run commandyarn -v
, it sayszsh: command not found: yarn
I tried install via sudoclean npm cache
also tried all these commandsnpm install -g
npm~/.npm-global
npm config set prefix ‘~/.npm-global
echo
‘ export PATH=~/.npm-global/bin:$PATH’ >> ~/.bash_profileNode.js version
v18.16.0
Example code
No response
Operating system
MacOS
Scope
Module and version
Not applicable.