I installed yarn using cmd
npm install --global yarn
but when I try to use it the system writes that: The term 'yarn' is not recognized as the name of a cmdlet, function, script file, or operable program.
PS C:\Users\BDV> npm --version
8.19.2
PS C:\Users\BDV> npm install --global yarn
changed 1 package, and audited 2 packages in 626ms
found 0 vulnerabilities
PS C:\Users\BDV> yarn --version
yarn : The term 'yarn' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ yarn --version
+ ~~~~
+ CategoryInfo : ObjectNotFound: (yarn:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\BDV>
Add the following to the System environment variable 'Path':
%USERPROFILE%\AppData\Roaming\npm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.