nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.46k stars 279 forks source link

Installed yarn but it shows not found #4172

Closed mashiioo closed 1 year ago

mashiioo commented 1 year ago

Details

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 -gnpm mkdir ~/.npm-global npm config set prefix ‘~/.npm-global echo ‘ export PATH=~/.npm-global/bin:$PATH’ >> ~/.bash_profile source ~/.bash_profile export PATH=~/.npm-global/bin:$PATH` Nothing worked. Please advise

Node.js version

v18.16.0

Example code

No response

Operating system

MacOS

Scope

Screenshot 2023-06-02 at 13 55 16

Module and version

Not applicable.