当前位置:网站首页>The 'yarn' item cannot be recognized as the name of a cmdlet, function, script file, or runnable program

The 'yarn' item cannot be recognized as the name of a cmdlet, function, script file, or runnable program

2022-06-13 07:11:00 Floating across the sea

Cannot be “yarn” Item identified as cmdlet、 function 、 The name of the script file or runnable program

Cannot be “yarn” Item identified as cmdlet、 function 、 The name of the script file or runnable program . Please check the spelling of the name , If the path is included , Please make sure the path is correct , And then try again .
The position of That's ok :1 character : 5

  • yarn <<<< --registry=https://registry.npm.taobao.org
    • CategoryInfo : ObjectNotFound: (yarn:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

terms of settlement

    npm install -g yarn

An error is reported after the execution again

Unable to load file C:\Users\Lenovo\AppData\Roaming\npm\yarn.ps1, Because script execution is forbidden in this system . For more information , see also “get-help about_signing”.

Actually, this place is a bit of a hole because I am win7 Our computer ,cmd It's no use executing commands on the Internet , We can learn from it at this time

Run as administrator vscode;
perform :get-ExecutionPolicy, Show Restricted, Indicates that the status is prohibited ;
perform :set-ExecutionPolicy RemoteSigned;
Then execute get-ExecutionPolicy, Show RemoteSigned.

Address of the above cited article

原网站

版权声明
本文为[Floating across the sea]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202270550097576.html