window.md 561 B

window 下环境配置

yarn 环境配置

安装 yarn 环境

    npm install -g yarn

vscode 中,使用 yarn 报错提示

[!warning] yarn 无法加载文件 xxxx路径/yarn 因为在此系统上禁止运行脚本.

错误原因: 在window上边因为安全策略禁止执行未经允许的脚本

解决方法

打开windows 的 powershell ,右键开始菜单可以找到 powershellpowershell 中输入如下命令即可,在输出的返回中输入 y 即可

set-ExecutionPolicy RemoteSigned