原因是 vsCode的 powershell 自身设限问题。
所以需要打开PowerShell
执行命令,查看是否限制了
get-ExecutionPolicy
如果结果为 Restricted 表示受限,需要打开
在PowerShell 中输入开启命令
set-ExecutionPolicy RemoteSigned
看到结果为 RemoteSigned,就是已经解开了,可以识yarn 和 npm 的命令了
原因是 vsCode的 powershell 自身设限问题。
所以需要打开PowerShell
get-ExecutionPolicy
如果结果为 Restricted 表示受限,需要打开
set-ExecutionPolicy RemoteSigned
看到结果为 RemoteSigned,就是已经解开了,可以识yarn 和 npm 的命令了